export VERSION="1.0.0-3"

fpm \
  -s dir -t deb \
  -m '"Joel Klimont" <joel.klimont@gmail.com>' \
  --license 'proprietary' \
  --description 'Library for robot used in the competition' \
  --url "https://github.com/F-WuTS/compLIB" \
  --deb-priority "optional" \
  --deb-systemd "compsrv.service" \
  --after-install postinstall.sh \
  --after-upgrade postinstall.sh \
  --name compsrv \
  --version $VERSION \
  --architecture all \
  -d "libprotobuf23" \
  -d "protobuf-compiler" \
  -d "python3-protobuf" \
  -d "pigpio" \
  -d "libsystemd-dev" \
  ./test_bin/compsrv=/usr/bin/compsrv

# MUST BE RUN IN BASH, zsh has 'ar' as an alias to 'apt'
# ar -xv compsrv-1.0.0-0-all.deb
