Add --analyze to README.

pull/425/head
Fredrik Öhrström 2021-12-25 14:19:27 +01:00
rodzic 1ae013b3af
commit 4c5ecb5b2a
5 zmienionych plików z 50 dodań i 23 usunięć

Wyświetl plik

@ -210,6 +210,11 @@ deb: wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
check_deb:
lintian --no-tag-display-limit wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
clean_deb:
rm -f wmbusmeters_$(DEBVERSION)_$(DEBARCH).deb
# Check docs verifies that all options in the source have been mentioned in the README and in the man page.
# Also any option not in the source but mentioned in the docs is warned for as well.
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

Wyświetl plik

@ -195,6 +195,7 @@ As <options> you can use:
--alarmexpectedactivity=mon-fri(08-17),sat-sun(09-12) Specify when the timeout is tested, default is mon-sun(00-23)
--alarmshell=<cmdline> invokes cmdline when an alarm triggers
--alarmtimeout=<time> Expect a telegram to arrive within <time> seconds, eg 60s, 60m, 24h during expected activity.
--analyze Analyze a telegram to find the best driver.
--debug for a lot of information
--device=<device> override device in config files. Use only in combination with --useconfig= option
--donotprobe=<tty> do not auto-probe this tty. Use multiple times for several ttys or specify "all" for all ttys.

Wyświetl plik

@ -1,7 +1,7 @@
#!/bin/bash
rm -f /tmp/copyright
cat > /tmp/copyright <<EOF
rm -f /tmp/tmpcopyrights
cat > /tmp/tmpcopyrights <<EOF
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: wmbusmeters
Source: https://github.com/weetmuts/wmbusmeters
@ -32,11 +32,11 @@ do
echo "Copyright: $cops"
echo "License: $license"
echo ""
} >> /tmp/copyright
} >> /tmp/tmpcopyrights
fi
done
cat >> /tmp/copyright <<EOF
cat >> /tmp/tmpcopyrights <<EOF
License: GPL-3+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -46,7 +46,7 @@ License: GPL-3+
On Debian systems, the complete text of the GNU General Public License
version 3 can be found in file "/usr/share/common-licenses/GPL-3".
Licenase: Public Domain
License: Public Domain
The authors, and therefore would be copyright holders, have as much
as possible relinguished their copyright to the public domain.
EOF

Wyświetl plik

@ -29,14 +29,41 @@ then
exit 1
fi
# Now run the standard install script into the directory
# that is to become the deb package.
rm -rf $BUILD/debian/wmbusmeters
mkdir -p $BUILD/debian/wmbusmeters/DEBIAN
./install.sh $BUILD/wmbusmeters $BUILD/debian/wmbusmeters --no-adduser
# Remove the conf and log files, they are to be installed by postinst.
ISIZE=$(du -s --apparent-size build/debian/wmbusmeters/ | cut -f 1)
# 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
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 -n $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/changelog.Debian
# Automatically collect copyright information.
rm -f /tmp/tmpcopyrights
./deb/collect_copyrights.sh
cp /tmp/tmpcopyrights $BUILD/debian/wmbusmeters/usr/share/doc/wmbusmeters/copyright
# Install the install/remove scripts.
for x in preinst postinst prerm postrm
do
cp deb/$x $BUILD/debian/wmbusmeters/DEBIAN/
chmod 555 $BUILD/debian/wmbusmeters/DEBIAN/$x
done
# Build the control file.
cat >> $BUILD/debian/wmbusmeters/DEBIAN/control << EOF
Package: wmbusmeters
Version: $DEBVERSION
@ -57,25 +84,17 @@ Description: read wireless and wired mbus telegrams from utility meters
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 -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
# Install the install/remove scripts.
for x in preinst postinst prerm postrm ; do \
cp deb/$x $BUILD/debian/wmbusmeters/DEBIAN/ ; \
chmod 555 $BUILD/debian/wmbusmeters/DEBIAN/$x ; \
done
# Change owner to root
chown -R root:root $BUILD/debian/wmbusmeters
# Package the deb
# Package the deb.
(cd $BUILD/debian; dpkg-deb --build wmbusmeters .)
# Move the built deb back to the source root.
mv $BUILD/debian/wmbusmeters_${DEBVERSION}_${DEBARCH}.deb .
chown $SUDO_USER:$SUDO_USER wmbusmeters_${DEBVERSION}_${DEBARCH}.deb
echo Built package $
echo But the deb package is not yet working correctly! Work in progress.

Wyświetl plik

@ -31,6 +31,8 @@ mqtt_publish) sent to a REST API (eg curl) or store it in a database
\fB\--alarmtimeout=\fR<time> Expect a telegram to arrive within <time> seconds, eg 60s, 60m, 24h during expected activity
\fB\--analyze\fR Analyze a telegram to find the best driver
\fB\--debug\fR for a lot of information
\fB\--device=\fR<device> override device in config files. Use only in combination with --useconfig= option