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

43 lines
916 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
# share
mkdir -p ./debian/usr/share/zjunet
cp ../../miscellaneous/* ./debian/usr/share/zjunet
cp ../../VERSION ./debian/usr/share/zjunet
2014-09-30 18:11:45 +08:00
# lib
mkdir -p ./debian/usr/lib/zjunet
cp ../../lib/*.sh ./debian/usr/lib/zjunet
2014-09-30 18:11:45 +08:00
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-13 21:21:43 +08:00
Depends: xl2tpd (>= 1.3.1), curl
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
fakeroot 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