Skip to content

Commit e60f259

Browse files
committed
Version 1.0.0
0 parents  commit e60f259

File tree

24 files changed

+1038
-0
lines changed

24 files changed

+1038
-0
lines changed

FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: ["https://www.paypal.me/luigifab", "https://gandi.link/f/4b904048", "https://ekwateur.fr/?parrain=EKW001147103"]

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# RadexReader
2+
3+
The RadexReader is an user-space driver for the [RADEX RD1212](https://quartarad.com/product-category/radiation-detector/) Geiger counter. It allow to read and clear stored data via USB. Warning! This tool is completely unrelated with QuartaRad.
4+
5+
Debian and Fedora packages submitted: [deb](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974217), [rpm](https://bugzilla.redhat.com/show_bug.cgi?id=1896742). Ubuntu: [PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages).
6+
7+
## Installation
8+
9+
It require *libusb*.
10+
11+
* Debian and Ubuntu: `sudo apt install python3-radexreader radexreader` (coming soon, or via PPA)
12+
13+
* Fedora: `sudo dnf install python3-radexreader` (coming soon)
14+
15+
* Linux: `sudo python3 -m pip install pyusb radexreader` (+libusb)
16+
17+
* Mac: `sudo pip install pyusb radexreader` (+libusb)
18+
19+
* Windows: `python -m pip install pyusb radexreader` (+[libusb](https://libusb.info/), put libusb-1.0.dll in system32)
20+
21+
* Docker Alpine: `sudo docker run --rm --user root -it --privileged -v /dev:/dev python:3.x-alpine /bin/sh` then: `apk update ; apk add libusb ; python3 -m pip install pyusb radexreader`
22+
23+
## Usage and Screenshots
24+
25+
* Read `src/cmd.py` for usage examples.
26+
* Run the command `radexreader` available with DEB/RPM packages.
27+
* Run the command `cmd.py` available with PYPI package.
28+
29+
[![Screnshot 1](images/thumbs/read.png?raw=true)](images/read.png?raw=true)
30+
[![Screnshot 2](images/thumbs/compare.png?raw=true)](images/compare.png?raw=true)
31+
32+
## Copyright
33+
34+
- Current version: 1.0.0 (11/11/2020)
35+
- Compatibility: Python 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9
36+
- Links: [PYPI package](https://pypi.org/project/radexreader/), [PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages)
37+
38+
This program is provided under the terms of the *GNU GPLv2+* license.

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
python-radexreader (1.0.0-5) unstable; urgency=low
2+
3+
* Initial debian package release (Closes: #973447)
4+
5+
-- Fabrice Creuzot <code@luigifab.fr> Wed, 11 Nov 2020 12:00:00 +0000

debian/control

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Source: python-radexreader
2+
Section: python
3+
Priority: optional
4+
Maintainer: Fabrice Creuzot <code@luigifab.fr>
5+
Build-Depends: debhelper-compat (= 13), python3-all, dh-python, dh-exec
6+
Rules-Requires-Root: no
7+
Standards-Version: 4.5.0
8+
Homepage: https://github.com/luigifab/python-radexreader
9+
Vcs-Browser: https://github.com/luigifab/python-radexreader
10+
Vcs-Git: https://github.com/luigifab/python-radexreader.git
11+
12+
Package: python3-radexreader
13+
Architecture: all
14+
Depends: ${misc:Depends}, ${python3:Depends}, python3-usb
15+
Description: Reader for the RADEX RD1212 Geiger counter (Python module)
16+
The RadexReader is an user-space driver for the RADEX RD1212. It
17+
allow to read and clear stored data via USB.
18+
.
19+
To avoid Access denied (insufficient permissions), don't forget
20+
to unplug the device after installation.
21+
22+
Package: radexreader
23+
Section: devel
24+
Architecture: all
25+
Depends: ${misc:Depends}, ${python3:Depends}, python3-radexreader
26+
Description: Reader for the RADEX RD1212 Geiger counter (CLI)
27+
The RadexReader is an user-space driver for the RADEX RD1212. It
28+
allow to read and clear stored data via USB.
29+
.
30+
To avoid Access denied (insufficient permissions), don't forget
31+
to unplug the device after installation.
32+
.
33+
This package provides the command line utility.

debian/copyright

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Source: https://github.com/luigifab/python-radexreader
3+
Upstream-Contact: Fabrice Creuzot <code@luigifab.fr>
4+
5+
Files: *
6+
Copyright: 2020 Fabrice Creuzot (luigifab) <code@luigifab.fr>
7+
License: GPL-2+
8+
9+
License: GPL-2+
10+
This package is free software; you can redistribute it and/or modify
11+
it under the terms of the GNU General Public License as published by
12+
the Free Software Foundation; either version 2 of the License, or
13+
(at your option) any later version.
14+
.
15+
This package is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU General Public License for more details.
19+
.
20+
You should have received a copy of the GNU General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>
22+
.
23+
On Debian systems, the complete text of the GNU General
24+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

debian/deb.sh

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#!/bin/bash
2+
# debian: sudo apt install dpkg-dev devscripts dh-make dh-python dh-exec
3+
4+
5+
6+
cd "$(dirname "$0")"
7+
version="1.0.0"
8+
9+
10+
rm -rf builder/
11+
mkdir builder
12+
13+
# copy to a tmp directory
14+
if [ true ]; then
15+
cd builder
16+
wget https://github.com/luigifab/python-radexreader/archive/v${version}/python-radexreader-${version}.tar.gz
17+
tar xzf python-radexreader-${version}.tar.gz
18+
cd ..
19+
else
20+
temp=python-radexreader-${version}
21+
mkdir /tmp/${temp}
22+
cp -r ../* /tmp/${temp}/
23+
rm -rf /tmp/${temp}/*/builder/ /tmp/${temp}/radexreader/__pycache__/
24+
25+
mv /tmp/${temp} builder/
26+
cp /usr/share/common-licenses/GPL-2 builder/${temp}/LICENSE
27+
28+
cd builder/
29+
tar czf ${temp}.tar.gz ${temp}
30+
cd ..
31+
fi
32+
33+
34+
# create packages for debian and ubuntu
35+
for serie in unstable hirsute groovy focal bionic xenial trusty precise; do
36+
37+
if [ $serie = "unstable" ]; then
38+
# for ubuntu
39+
cp -a builder/python-radexreader-${version}/ builder/python-radexreader-${version}+src/
40+
# debian only
41+
cd builder/python-radexreader-${version}/
42+
else
43+
# ubuntu only
44+
cp -a builder/python-radexreader-${version}+src/ builder/python-radexreader-${version}+${serie}/
45+
cd builder/python-radexreader-${version}+${serie}/
46+
fi
47+
48+
dh_make -a -s -y -f ../python-radexreader-${version}.tar.gz -p python-radexreader
49+
50+
rm -f debian/*ex debian/*EX debian/README* debian/*doc*
51+
mkdir debian/upstream
52+
mv debian/metadata debian/upstream/metadata
53+
mv debian/udev debian/python3-radexreader.udev
54+
mv debian/metainfo.xml debian/python3-radexreader.metainfo.xml
55+
chmod +x debian/radexreader.install
56+
57+
if [ $serie = "unstable" ]; then
58+
dpkg-buildpackage -us -uc
59+
else
60+
# debhelper: unstable:13 hirsute:13 groovy:13 focal:12 bionic:9 xenial:9 trusty:9 precise:9
61+
if [ $serie = "focal" ]; then
62+
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 12)/g' debian/control
63+
fi
64+
if [ $serie = "bionic" ]; then
65+
sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 9)/g' debian/control
66+
fi
67+
if [ $serie = "xenial" ]; then
68+
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9)/g' debian/control
69+
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
70+
echo 9 > debian/compat
71+
fi
72+
if [ $serie = "trusty" ]; then
73+
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9)/g' debian/control
74+
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
75+
echo 9 > debian/compat
76+
fi
77+
if [ $serie = "precise" ]; then
78+
sed -i 's/debhelper-compat (= 13)/debhelper (>= 9)/g' debian/control
79+
sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' debian/control
80+
sed -i 's/, dh-python//g' debian/control
81+
echo 9 > debian/compat
82+
fi
83+
sed -i 's/unstable/'${serie}'/g' debian/changelog
84+
sed -i 's/-5) /-5+'${serie}') /' debian/changelog
85+
dpkg-buildpackage -us -uc -ui -d -S
86+
fi
87+
echo "==========================="
88+
cd ..
89+
90+
if [ $serie = "unstable" ]; then
91+
# debian only
92+
debsign python-radexreader_${version}-*.changes
93+
echo "==========================="
94+
lintian -EviIL +pedantic python-radexreader_${version}-*.deb
95+
else
96+
# ubuntu only
97+
debsign python-radexreader_${version}*+${serie}*source.changes
98+
fi
99+
echo "==========================="
100+
cd ..
101+
done
102+
103+
ls -dltrh $PWD/builder/*.deb $PWD/builder/*.changes
104+
echo "==========================="
105+
106+
# cleanup
107+
rm -rf builder/*/

debian/metadata

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bug-Database: https://github.com/luigifab/python-radexreader/issues/
2+
Bug-Submit: https://github.com/luigifab/python-radexreader/issues/new
3+
Documentation: https://github.com/luigifab/python-radexreader
4+
Repository: https://github.com/luigifab/python-radexreader.git
5+
Repository-Browse: https://github.com/luigifab/python-radexreader

debian/metainfo.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<component>
3+
<id>python3-radexreader</id>
4+
<name>python3-radexreader</name>
5+
<metadata_license>GPL-2+</metadata_license>
6+
<summary>Reader for the RADEX RD1212 Geiger counter</summary>
7+
<description>
8+
<p>
9+
The RadexReader is an user-space driver for the RADEX RD1212.
10+
It allow to read and clear stored data via USB.
11+
</p>
12+
</description>
13+
<provides>
14+
<modalias>usb:v03EBp5603d*</modalias>
15+
</provides>
16+
</component>

debian/python3-radexreader.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/radexreader/ usr/lib/python3/dist-packages
2+
debian/*.metainfo.xml usr/share/metainfo

0 commit comments

Comments
 (0)