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

38 lines
758 B
Bash
Raw Normal View History

2014-09-30 18:11:45 +08:00
#!/bin/sh
2014-09-30 20:34:58 +08:00
rm -rf *.opk
VERSION=$1
2014-09-30 19:13:43 +08:00
2014-09-30 18:11:45 +08:00
# lib
mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/* ./debian/usr/lib/zjunet
2014-09-30 20:34:58 +08:00
# 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
2014-09-30 19:13:43 +08:00
Package: zjunet
Version: $VERSION
2014-09-30 20:07:18 +08:00
Section: net
2014-09-30 19:13:43 +08:00
Priority: optional
Architecture: all
2014-10-03 21:12:37 +08:00
Depends: xl2tpd, libcurl
2014-09-30 19:13:43 +08:00
Maintainer: Zeno Zeng <zenoofzeng@gmail.com>
Description: Command Line Scripts for ZJU
This script provides a VPN / WLAN / NEXTHOP for ZJUer.
EOF
2014-09-30 18:11:45 +08:00
# dpkg-deb
2014-09-30 20:34:58 +08:00
find ./debian -type d | xargs chmod 755
2014-10-03 21:12:37 +08:00
dpkg-deb -Zgzip --build debian # for opkg
2014-09-30 20:34:58 +08:00
mv debian.deb zjunet_${VERSION}_all.opk
2014-09-30 18:11:45 +08:00
# remove debian/
rm -rf ./debian
2014-09-30 19:13:43 +08:00
rm -rf control