1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 19:54:48 +08:00

build.sh for openwrt & debian

This commit is contained in:
Zeno Zeng 2014-09-30 20:34:58 +08:00
parent 08d5421d8b
commit 4f487eee37
5 changed files with 44 additions and 27 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
*.deb *.deb
*.ipk *.opk

12
build/build.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
VERSION=0.1.0-7
cd debian
./build.sh $VERSION > /dev/null
cd ../openwrt
./build.sh $VERSION > /dev/null
cd ..
find . -regextype posix-egrep -regex ".*\.(opk|deb)$"

View File

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
rm -rf *.deb
VERSION=$1
# lib # lib
mkdir -p ./debian/usr/lib/zjunet mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/* ./debian/usr/lib/zjunet cp ../../lib/* ./debian/usr/lib/zjunet
@ -11,12 +15,23 @@ chmod +x ./debian/usr/bin/zjunet
# contorl file # contorl file
mkdir -p debian/DEBIAN mkdir -p debian/DEBIAN
find ./debian -type d | xargs chmod 755 cat > debian/DEBIAN/control <<EOF
cp control debian/DEBIAN Package: zjunet
Version: $VERSION
Section: net
Priority: optional
Architecture: all
Depends: xl2tpd (>= 1.3.1), curl
Maintainer: Zeno Zeng <zenoofzeng@gmail.com>
Description: Command Line Scripts for ZJU
This script provides a VPN / WLAN / NEXTHOP for ZJUer.
EOF
# dpkg-deb # dpkg-deb
find ./debian -type d | xargs chmod 755
dpkg-deb --build debian dpkg-deb --build debian
mv debian.deb zjunet_0.1-2_all.deb mv debian.deb zjunet_${VERSION}_all.deb
# remove debian/ # remove debian/
rm -rf ./debian rm -rf ./debian
rm -f control

View File

@ -1,10 +0,0 @@
Package: zjunet
Version: 0.1-2
Section: base
Priority: optional
Architecture: all
Depends: xl2tpd (>= 1.3.2), curl, libc-bin
Maintainer: Zeno Zeng <zenoofzeng@gmail.com>
Description: Command Line Scripts for ZJU
This script provides a VPN / WLAN / NEXTHOP for ZJUer.

View File

@ -1,12 +1,21 @@
#!/bin/sh #!/bin/sh
VERSION=0.1-6 rm -rf *.opk
VERSION=$1
# lib # lib
mkdir -p ./debian/usr/lib/zjunet mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/* ./debian/usr/lib/zjunet cp ../../lib/* ./debian/usr/lib/zjunet
cat > control <<EOF # bin
mkdir -p ./debian/usr/bin
echo '/usr/lib/zjunet/zjunet.sh "$@"' >> ./debian/usr/bin/zjunet
chmod +x ./debian/usr/bin/zjunet
# contorl file
mkdir -p debian/DEBIAN
cat > debian/DEBIAN/control <<EOF
Package: zjunet Package: zjunet
Version: $VERSION Version: $VERSION
Section: net Section: net
@ -18,19 +27,10 @@ Description: Command Line Scripts for ZJU
This script provides a VPN / WLAN / NEXTHOP for ZJUer. This script provides a VPN / WLAN / NEXTHOP for ZJUer.
EOF EOF
# bin
mkdir -p ./debian/usr/bin
echo '/usr/lib/zjunet/zjunet.sh "$@"' >> ./debian/usr/bin/zjunet
chmod +x ./debian/usr/bin/zjunet
# contorl file
mkdir -p debian/DEBIAN
find ./debian -type d | xargs chmod 755
cp control debian/DEBIAN
# dpkg-deb # dpkg-deb
find ./debian -type d | xargs chmod 755
dpkg-deb -Zgzip --build debian dpkg-deb -Zgzip --build debian
mv debian.deb zjunet_${VERSION}_all.deb mv debian.deb zjunet_${VERSION}_all.opk
# remove debian/ # remove debian/
rm -rf ./debian rm -rf ./debian