mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 18:08:28 -07:00
part1 for Debian
This commit is contained in:
parent
7a2bff9c51
commit
17d81c871c
29
etc/debian/fpm-make.sh
Executable file
29
etc/debian/fpm-make.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
tempdir=$(mktemp -d /tmp/ot-XXX)
|
||||
|
||||
make install DESTDIR=$tempdir
|
||||
|
||||
name="ot-recorder"
|
||||
version=$(awk '{print $NF;}' version.h | sed -e 's/"//g' )
|
||||
arch=x86_64
|
||||
debfile="/tmp/${name}_${version}_${arch}.deb"
|
||||
|
||||
rm -f "${debfile}"
|
||||
|
||||
fpm -s dir \
|
||||
-t deb \
|
||||
-n ${name} \
|
||||
-v ${version} \
|
||||
--vendor "OwnTracks.org" \
|
||||
-a all \
|
||||
--maintainer 'jpmens@gmail.com' \
|
||||
-C $tempdir \
|
||||
-p ${debfile} \
|
||||
-d "libmosquitto1" \
|
||||
-d "libcurl3" \
|
||||
--post-install etc/debian/postinst \
|
||||
usr var
|
||||
|
29
etc/debian/postinst
Normal file
29
etc/debian/postinst
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
getent group owntracks > /dev/null || /usr/sbin/groupadd -r owntracks
|
||||
chgrp owntracks /var/spool/owntracks/recorder/store
|
||||
chgrp owntracks /var/spool/owntracks/recorder/store/ghash
|
||||
chgrp owntracks /usr/local/bin/ocat /usr/local/sbin/ot-recorder
|
||||
chmod 3755 /usr/local/bin/ocat /usr/local/sbin/ot-recorder
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user