Skip to content

Commit

Permalink
Added Ubuntu .deb package generator (initial draft).
Browse files Browse the repository at this point in the history
  • Loading branch information
Massimiliano Pala committed Jun 28, 2021
1 parent 8f245ab commit 729c30c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tools/pkg-gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Post-Quantum and Composite Crypto
# Patch and Diff Tools for Automation
# (c) 2021 by Massimiliano Pala

NOW=$(date +%Y%m%d%H%M%S)
PRJ_NAME=libpki-pqc
PRJ_VER=$(libpki-config --version)
PRJ_ARCH=$(uname -m)
BASE_DIR=${PRJ_NAME}

# Builds the Package Structure
mkdir -p ${BASE_DIR}/DEBIAN
echo <<EOF
Package: ${PRJ_NAME}
Version: ${PKG_VER}
Section: custom
Priority: optional
Architecture: all
Essential: no
Installed-Size: 1024
Maintainer: OpenCA.Org
Description: Provides Post-Quantum LibPKI and OpenSSL
EOF > ${BASE_DIR}/DEBIAN/control

# Copies the binary files from the installed directory
mkdir -p opt/${BASE_DIR} && \
cp -rvf /opt/${BASE_DIR}/* opt/${BASE_DIR}/

# Builds the package
dpkg-deb --build ${BASE_DIR}

# Fixes the name
mv ${PRJ_NAME}.deb ${PRJ_NAME}-${PRJ_VER}_${ARCH}.deb

# All Done
exit 0

0 comments on commit 729c30c

Please sign in to comment.