Skip to content

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
duiniuluantanqin committed Sep 14, 2023
1 parent 727e125 commit 4b9a5a3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
20 changes: 18 additions & 2 deletions trunk/packaging/deb.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
PACKAGE="$1"
VERSION="$2"

# We can only build Debian packages, if the Debian build tools are installed
if [ \! -x /usr/bin/debuild ]; then
echo "Cannot find /usr/bin/debuild. Not building Debian packages." 1>&2
Expand All @@ -10,9 +13,22 @@ if [ \! -x ./configure ]; then
exit 0
fi

trap 'rm -rf '`pwd`/debian'; exit $?' EXIT SIGHUP SIGINT SIGTERM

rm -rf debian
# make tar.gz
rm -f "${PACKAGE}_${VERSION}.tar.gz"
tar -czvf "${PACKAGE}_${VERSION}.tar.gz" *


# trap 'rm -rf '`pwd`/tmp'; exit $?' EXIT SIGHUP SIGINT SIGTERM

rm -rf tmp
mkdir -p tmp/trunk
cd tmp

ln -s ../"${PACKAGE}_${VERSION}.tar.gz" "${PACKAGE}_${VERSION}.orig.tar.gz"
tar -xzvf "../${PACKAGE}_${VERSION}.tar.gz" -C trunk
cd trunk

# Debian has very specific requirements about the naming of build directories
cp -a "packaging/deb" "debian"

Expand Down
4 changes: 2 additions & 2 deletions trunk/packaging/deb/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
srs-server (5.0.170-1) unstable; urgency=medium
srs-server (5.0.4-1) unstable; urgency=medium

* Reintroduce srs-server to Debian.
There are far to many changes since srs-server 0.1.0 to mention them
Expand All @@ -9,4 +9,4 @@ srs-server (5.0.170-1) unstable; urgency=medium
Other documents can be found here:
https://github.com/ossrs/srs

-- chenhaibo <[email protected]> Mon, 14 Aug 2023 22:51:22 +0800
-- chenhaibo <[email protected]> Wed, 13 Sep 2023 22:51:22 +0800
4 changes: 0 additions & 4 deletions trunk/packaging/deb/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ DEBIAN_TMP := debian/tmp
override_dh_auto_configure:
./configure --prefix=$(INSTALL_DIR) --config=/etc/srs-server/srs-server.conf

override_dh_auto_build:
make -j16

override_dh_auto_install:
make install
# copy binary
Expand All @@ -33,4 +30,3 @@ override_dh_auto_install:
# copy man
mkdir -p $(DEBIAN_TMP)/usr/share/man/man8
cp doc/man/srs-server.8 $(DEBIAN_TMP)/usr/share/man/man8/

2 changes: 1 addition & 1 deletion trunk/packaging/deb/source/format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0 (native)
3.0 (quilt)

0 comments on commit 4b9a5a3

Please sign in to comment.