ydotool
ydotool copied to clipboard
issues creating debian package
In case you want to create a deb package, I find it very easy with the following procedure (I don't know if there is a better way using Github Actions).
- install
fpmonce:gem install fpm - run your
cmakeandmakeand then, inside thebuild/directory you can run the followings:
PROG_VERSION=x.x.x
[email protected]
DESC='Generic Linux command-line automation tool'
gzip manpage/ydotool.1 manpage/ydotoold.8
strip ydotool ydotoold
# There we go:
fpm -f -t deb -n $PROG_NAME -v $PROG_VERSION -m "$EMAIL" --vendor "$EMAIL" \
--url https://github.com/ReimuNotMoe/ydotool -a x86_64 \
--deb-use-file-permissions --deb-systemd ./ydotool.service --deb-systemd-enable
--deb-systemd-auto-start --deb-systemd-restart-after-upgrade --description "$DESC" \
-s dir ./ydotool=/usr/bin/ydotool ./ydotoold=/usr/bin/ydotoold \
manpage/ydotool.1.gz=/usr/share/man/man1/ydotool.1.gz \
manpage/ydotoold.8.gz=/usr/share/man/man8/ydotoold.8.gz
Feel free to use this, or any other method, however:
- the path inside the the file
ydotoold.serviceis /usr/local/bin/ydotool. But if you want to create a package/usr/bin/ydotoolis probably more suitable. - there is something wrong with this repository:
git describe --tagsdoes not return a full list of tags and it returnsv0.0.1instead. - ~I'm not sure if you want to add
--socket-perm=0666by default in the service file. I did it for myself.~
Adding 666 permissions by default is wrong. It's better to use a configuration file /etc/default/ydotool and add a socket permission parameter there.
If the tags were working properly, you can detect the latest tag with the following command:
git describe --tags $(git rev-list --tags --max-count=1)