Skip to content

Commit 90bde39

Browse files
committed
Added script to build deb package.
1 parent a6ae201 commit 90bde39

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

scripts/build-deb.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
VERSION=$(grep -Eo '\([0-9.]+\)' ../debian/changelog | grep -Eo '[0-9.]+')
4+
5+
rm -rf ../dist
6+
mkdir -p ../dist/DEBIAN/
7+
mkdir -p ../dist/usr/local/bin/
8+
mkdir -p ../dist/usr/local/lib/
9+
cp ../debian/control ../dist/DEBIAN/
10+
cd ..
11+
autoreconf -i -v --force
12+
./configure
13+
make
14+
cp ip2proxy ./dist/usr/local/bin/
15+
cp libIP2Proxy/.libs/* ./dist/usr/local/lib/
16+
17+
sed -i '/^$/d' ./dist/DEBIAN/control
18+
sed -i '/^Depends/d' ./dist/DEBIAN/control
19+
sed -i 's/Architecture:.*/Architecture: '$(dpkg --print-architecture)'/' ./dist/DEBIAN/control
20+
echo "Version: $VERSION" >> ./dist/DEBIAN/control
21+
dpkg-deb -Zgzip --build dist ip2proxy-$VERSION.deb

0 commit comments

Comments
 (0)