Skip to content

Commit

Permalink
simplify package generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpoelen committed Nov 13, 2023
1 parent cac5490 commit 1520196
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 1,456 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,9 @@ Exemple call line for proxy_recorder:

# Packaging

With https://github.com/wallix/packager
Create Debian package with

packager.py build \
--target-file packaging/targets/debian \
--version-file include/main/version.hpp \
--build-package \
--no-check
./packaging/package.sh


# Test files
Expand Down
5 changes: 5 additions & 0 deletions packaging/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
redemption (%VERSION%) unknown; urgency=low

* rdpproxy

-- wallix <wab at wallix.com> Tue, 01 Sep 2020 17:01:56 +0200
2 changes: 1 addition & 1 deletion packaging/template/debian/compat → packaging/debian/compat
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
10
15 changes: 15 additions & 0 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: redemption
Section: net
Priority: extra
Maintainer: Proxy Team <[email protected]>
Build-Depends: debhelper (>=7), dpkg-dev, g++, libboost-tools-dev, libssl-dev, libkrb5-dev, libsnappy-dev, libpng-dev, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, libx264-dev, zlib1g-dev, libbz2-dev, libhyperscan-dev
Standards-Version: %VERSION%
Homepage: https://github.com/wallix/redemption

Package: redemption
Architecture: any
Homepage: https://github.com/wallix/redemption
Depends: ${shlibs:Depends}
Description: A new generation RDP proxy for WAB
A new generation RDP proxy for WAB
wwww: https://github.com/wallix/redemption
4 changes: 4 additions & 0 deletions packaging/debian/redemption.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/etc/rdpproxy/*
/usr/local/bin/*
/usr/local/share/rdpproxy/*
/usr/local/lib/libredrec.so
22 changes: 11 additions & 11 deletions packaging/template/debian/rules → packaging/debian/rules
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
export DH_VERBOSE=10
export DESTDIR=debian/buildtmp

export PREFIX=%PREFIX%
export LIB_PREFIX=%LIB_PREFIX%
export ETC_PREFIX=%ETC_PREFIX%
export CERT_PREFIX=%CERT_PREFIX%
export PREFIX=/usr/local
export LIB_PREFIX=/usr/local/lib
export ETC_PREFIX=/etc/rdpproxy
export CERT_PREFIX=/etc/rdpproxy/cert
export RDPLICENSE_PATH=$CERT_PREFIX/rdplicense
export RDPCERT_PATH=$CERT_PREFIX
export METRICS_PATH=%METRICS_PATH%
export RECORD_PATH=%RECORD_PATH%
export RECORD_TMP_PATH=%RECORD_TMP_PATH%
export HASH_PATH=%HASH_PATH%
export METRICS_PATH=/var/rdpproxy/recorded/metrics
export RECORD_PATH=/var/rdpproxy/recorded/rdp
export RECORD_TMP_PATH=/var/rdpproxy/tmp
export HASH_PATH=/var/rdpproxy/hash
export PERSISTENT_PATH=/var/lib/redemption/cache
#export PERSISTENT_PATH=%PERSISTENT_PATH%
export DRIVE_REDIRECTION_PATH=%DRIVE_REDIRECTION_PATH%
#export PERSISTENT_PATH=
export DRIVE_REDIRECTION_PATH=/var/rdpproxy/drive_redirection


BJAM_EXTRA_INSTALL=%BJAM_EXTRA% %DEBUG_OPT%
BJAM_EXTRA_INSTALL=-j2 cxxflags='-DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING'

clean:
# dh_testdir - test directory before building Debian package. It makes sure
Expand Down
18 changes: 18 additions & 0 deletions packaging/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -exu

cd "$(dirname "$0")/.."

if ! [[ "$(<include/main/version.hpp)" =~ 'VERSION "'([^\"]+) ]]; then
echo Version not found >&2
exit 1
fi
version="${BASH_REMATCH[1]}"

[[ -d debian ]] && rm -rf debian
cp -R packaging/debian debian
sed -i "s/%VERSION%/$version/g" debian/*

dpkg-buildpackage -b -tc -us -uc -r
rm -rf debian
16 changes: 0 additions & 16 deletions packaging/targets/debian

This file was deleted.

Loading

0 comments on commit 1520196

Please sign in to comment.