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

43 lines
900 B
Bash
Raw Normal View History

2014-09-30 18:11:45 +08:00
#!/bin/sh
2019-06-04 15:44:12 +08:00
set -e
2014-09-30 18:11:45 +08:00
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
2016-05-17 09:15:20 +08:00
install -m 755 -d ./debian/usr/bin
install -m 755 ../../bin/zjunet ./debian/usr/bin/zjunet
2014-09-30 20:34:58 +08:00
# 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
2019-06-04 15:44:12 +08:00
Depends: xl2tpd (>= 1.3.1), curl, bind-dig
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