kopia lustrzana https://github.com/weetmuts/wmbusmeters
More work on creating deb package.
rodzic
3fffa30188
commit
b9d200f04f
9
Makefile
9
Makefile
|
@ -199,14 +199,17 @@ all: $(BUILD)/wmbusmeters $(BUILD)/wmbusmeters-admin $(BUILD)/testinternals
|
|||
|
||||
deb: wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
|
||||
|
||||
check_deb:
|
||||
lintian --no-tag-display-limit wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
|
||||
|
||||
check_docs:
|
||||
@cat src/cmdline.cc | grep -o -- '--[a-z][a-z]*' | sort | uniq | grep -v internaltesting > /tmp/options_in_code
|
||||
@cat wmbusmeters.1 | grep -o -- '--[a-z][a-z]*' | sort | uniq | grep -v internaltesting > /tmp/options_in_man
|
||||
@cat README.md | grep -o -- '--[a-z][a-z]*' | sort | uniq | grep -v internaltesting > /tmp/options_in_readme
|
||||
@./build/wmbusmeters --help | grep -o -- '--[a-z][a-z]*' | sort | uniq | grep -v internaltesting > /tmp/options_in_binary
|
||||
@diff /tmp/options_in_code /tmp/options_in_man
|
||||
@diff /tmp/options_in_code /tmp/options_in_readme
|
||||
@diff /tmp/options_in_code /tmp/options_in_binary
|
||||
@diff /tmp/options_in_code /tmp/options_in_man || echo CODE_VS_MAN
|
||||
@diff /tmp/options_in_code /tmp/options_in_readme || echo CODE_VS_README
|
||||
@diff /tmp/options_in_code /tmp/options_in_binary || echo CODE_VS_BINARY
|
||||
@echo "OK docs"
|
||||
|
||||
install: $(BUILD)/wmbusmeters check_docs
|
||||
|
|
18
README.md
18
README.md
|
@ -107,7 +107,7 @@ explicit driver name with: `driver=multical21:c1` or explicitly state
|
|||
that driver detection is automatic: `driver=auto`.
|
||||
|
||||
Now plugin your wmbus dongle.
|
||||
Wmbusmeters should start automatically, check with `tail -f /var/log/syslog` and `tail -f /var/log/wmbusmeters/wmbusmeters.log`
|
||||
Wmbusmeters should start automatically, check with `tail -f /var/log/syslog` and `tail -f /var/log/wmbusmeters/wmbusmeters.log`
|
||||
(If you are using an rtlsdr dongle, then make sure that either the binaries `/usr/bin/rtl_sdr` and
|
||||
`/usr/bin/rtl_wmbus` exists and are executable. Or `rtl_sdr/rtl_wmbus` exists inside the same directory
|
||||
as the wmbusmeters directory is located. If not you will see the
|
||||
|
@ -295,7 +295,7 @@ As meter quadruples you specify:
|
|||
* `<meter_name>`: a mnemonic for this particular meter (!Must not contain a colon ':' character!)
|
||||
* `<meter_driver>`: use `auto` or one of the supported meters (can be suffixed with `:<mode>` to specify which mode you expect the meter to use when transmitting)
|
||||
* `<meter_id>`: an 8 digit mbus id, usually printed on the meter
|
||||
* `<meter_key>`: an encryption key unique for the meter
|
||||
* `<meter_key>`: an encryption key unique for the meter
|
||||
if the meter uses no encryption, then supply `NOKEY`
|
||||
|
||||
```
|
||||
|
@ -535,7 +535,7 @@ corresponding meter files in wmbusmetrs' config directory.
|
|||
You can also use the XMLExtract Java program. `javac utils/XMLExtract`
|
||||
and then `java -cp utils XMLExtract` to print the key on the command line.
|
||||
|
||||
You can run wmbusmeters with `--logtelegram`s to get log output that can
|
||||
You can run wmbusmeters with `--logtelegrams` to get log output that can
|
||||
be placed in a simulation.txt file. You can then run wmbusmeter and
|
||||
instead of an usb device, you provide the `simulation.txt` file as
|
||||
argument. See test.sh for more info.
|
||||
|
@ -576,16 +576,16 @@ Binary generated: `./build_arm_debug/wmbusmeters`
|
|||
|
||||
`make install` installs the files:
|
||||
|
||||
`/etc/wmbusmeters.conf`
|
||||
`/usr/bin/wmbusmeters`
|
||||
`/usr/sbin/wmbusmetersd`
|
||||
`/etc/systemd/system/wmbusmeters.service`
|
||||
`/etc/wmbusmeters.conf`
|
||||
`/usr/bin/wmbusmeters`
|
||||
`/usr/sbin/wmbusmetersd`
|
||||
`/etc/systemd/system/wmbusmeters.service`
|
||||
`/etc/logrotate.d/wmbusmeters`
|
||||
|
||||
creates these directories:
|
||||
|
||||
`/etc/wmbusmeters.d`
|
||||
`/var/log/wmbusmeters/meter_readings`
|
||||
`/etc/wmbusmeters.d`
|
||||
`/var/log/wmbusmeters/meter_readings`
|
||||
|
||||
and adds the user `wmbusmeters` with no login account.
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
wmbusmeters (1.3.0-1) stable; urgency=medium
|
||||
|
||||
* First package upload (Closes: #xxxxxx)
|
||||
|
||||
-- Fredrik Öhrström <oehrstroem@gmail.com> Sat, 26 Jun 2021 12:39:00 +0100
|
|
@ -32,24 +32,38 @@ fi
|
|||
rm -rf $BUILD/debian/wmbusmeters
|
||||
mkdir -p $BUILD/debian/wmbusmeters/DEBIAN
|
||||
./install.sh $BUILD/wmbusmeters $BUILD/debian/wmbusmeters --no-adduser
|
||||
# Remove the conf files, they are to be installed by postinst.
|
||||
# Remove the conf and log files, they are to be installed by postinst.
|
||||
rm $BUILD/debian/wmbusmeters/etc/wmbusmeters.conf
|
||||
rm -rf $BUILD/debian/wmbusmeters/etc/wmbusmetersd
|
||||
rm -rf $BUILD/debian/wmbusmeters/var/log/wmbusmeters
|
||||
# Build the control file
|
||||
echo "Package: wmbusmeters" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Version: $DEBVERSION" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Maintainer: Fredrik Öhrström <oehrstroemgmail.com>" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Architecture: $DEBARCH" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Installed-Size: 1" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Depends: libc6 (>= 2.27)" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Section: kernel" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Priority: optional" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Homepage: https://github.com/weetmuts/wmbusmeters" >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
echo "Description: A tool to read wireless mbus telegrams from utility meters." >> $BUILD/debian/wmbusmeters/DEBIAN/control
|
||||
cat >> $BUILD/debian/wmbusmeters/DEBIAN/control << EOF
|
||||
Package: wmbusmeters
|
||||
Version: $DEBVERSION
|
||||
Maintainer: Fredrik Öhrström <oehrstroem@gmail.com>
|
||||
Architecture: $DEBARCH
|
||||
Installed-Size: $ISIZE
|
||||
Depends: libc6 (>= 2.27)
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Homepage: https://github.com/weetmuts/wmbusmeters
|
||||
Description: read wireless and wired mbus telegrams from utility meters
|
||||
Wmbusmeters receives and decodes C1,T1 or S1 telegrams (using
|
||||
the wireless or wired mbus protocol) to acquire utility meter
|
||||
readings. The readings can then be published using MQTT,
|
||||
curled to a REST api, inserted into a database or stored in a log file.
|
||||
.
|
||||
Installing this package results in a full installation, including the
|
||||
configuration files and the daemon. Configuration files for an existing
|
||||
installation are preserved.
|
||||
EOF
|
||||
cat >> $BUILD/debian/wmbusmeters/DEBIAN/conffiles << EOF
|
||||
/etc/logrotate.d/wmbusmeters
|
||||
EOF
|
||||
mkdir -p $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters
|
||||
# Install the changelog
|
||||
cp deb/changelog $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/changelog.Debian
|
||||
gzip -v9 $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/changelog.Debian
|
||||
gzip -v9 -n $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/changelog.Debian
|
||||
# Collect copyright information
|
||||
./deb/collect_copyrights.sh
|
||||
cp /tmp/copyright $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/copyright
|
||||
|
|
|
@ -7,6 +7,6 @@ rm -f "$ROOT"/usr/bin/wmbusmeters "$ROOT"/usr/sbin/wmbusmetersd
|
|||
mkdir -p "$ROOT"/usr/bin
|
||||
mkdir -p "$ROOT"/usr/sbin
|
||||
cp "$SRC" "$ROOT"/usr/bin/wmbusmeters
|
||||
ln -s /usr/bin/wmbusmeters "$ROOT"/usr/sbin/wmbusmetersd
|
||||
(cd "$ROOT"/usr/sbin; ln -s ../bin/wmbusmeters wmbusmetersd)
|
||||
|
||||
echo "binaries: installed $ROOT/usr/bin/wmbusmeters and $ROOT/usr/sbin/wmbusmetersd"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
rm -f "$ROOT"/usr/share/man/man1/wmbusmeters.1.gz
|
||||
mkdir -p "$ROOT"/usr/share/man/man1
|
||||
gzip -v9 -c wmbusmeters.1 > "$ROOT"/usr/share/man/man1/wmbusmeters.1.gz
|
||||
gzip -v9 -n -c wmbusmeters.1 > "$ROOT"/usr/share/man/man1/wmbusmeters.1.gz
|
||||
(cd "$ROOT"/usr/share/man/man1; ln -s wmbusmeters.1.gz wmbusmetersd.1.gz)
|
||||
|
||||
echo "man page: installed $ROOT/usr/share/man/man1/wmbusmeters.1.gz"
|
||||
echo "man page: installed $ROOT/usr/share/man/man1/wmbusmeters.1.gz $ROOT/usr/share/man/man1/wmbusmetersd.1.gz"
|
||||
|
|
Ładowanie…
Reference in New Issue