build-deb.sh 764 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. DESTDIR=./dist
  3. VERSION=$(git describe --tag | sed 's/^v//')
  4. ITERATION=1
  5. NAME=scw-cap
  6. rm -rf $DESTDIR
  7. install -d $DESTDIR/{usr/bin,etc/systemd/system,etc/$NAME,usr/share/$NAME}
  8. make
  9. install -m 755 munchclient $DESTDIR/usr/bin/$NAME
  10. install -m 644 munchclient.toml $DESTDIR/etc/$NAME/$NAME.toml
  11. install -m 644 munchclient.toml $DESTDIR/usr/share/$NAME/$NAME.toml
  12. # install -m 644 munchclient.service $DESTDIR/etc/systemd/system/$NAME.service
  13. # install -m 644 ca-chain.cert.pem $DESTDIR/usr/share/$NAME/
  14. fpm -s dir -t deb -C $DESTDIR --name $NAME \
  15. --version $VERSION \
  16. --iteration $ITERATION \
  17. --deb-systemd $NAME.service \
  18. --description "ScraperWall Packet Capture" \
  19. --config-files /etc/$NAME/$NAME.toml \
  20. -p ./debian
  21. rm -rf $DESTDIR