|
@@ -0,0 +1,27 @@
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+DESTDIR=./dist
|
|
|
+VERSION=$(git describe --tag | sed 's/^v//')
|
|
|
+ITERATION=1
|
|
|
+NAME=scw-cap
|
|
|
+
|
|
|
+rm -rf $DESTDIR
|
|
|
+install -d $DESTDIR/{usr/bin,etc/systemd/system,etc/$NAME,usr/share/$NAME}
|
|
|
+make
|
|
|
+
|
|
|
+install -m 755 munchclient $DESTDIR/usr/bin/$NAME
|
|
|
+install -m 644 munchclient.toml $DESTDIR/etc/$NAME/$NAME.toml
|
|
|
+install -m 644 munchclient.toml $DESTDIR/usr/share/$NAME/$NAME.toml
|
|
|
+# install -m 644 munchclient.service $DESTDIR/etc/systemd/system/$NAME.service
|
|
|
+# install -m 644 ca-chain.cert.pem $DESTDIR/usr/share/$NAME/
|
|
|
+
|
|
|
+fpm -s dir -t deb -C $DESTDIR --name $NAME \
|
|
|
+ --version $VERSION \
|
|
|
+ --iteration $ITERATION \
|
|
|
+ --deb-systemd $NAME.service \
|
|
|
+ --description "ScraperWall Packet Capture" \
|
|
|
+ --config-files /etc/$NAME/$NAME.toml \
|
|
|
+ -p ./debian
|
|
|
+
|
|
|
+rm -rf $DESTDIR
|
|
|
+
|