-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Ubuntu .deb package generator (initial draft).
- Loading branch information
Massimiliano Pala
committed
Jun 28, 2021
1 parent
8f245ab
commit 729c30c
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |