-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
88 lines (78 loc) · 1.95 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Maintainer: Matthias Strubel <[email protected]>
pkgname=librarybox-full
pkgver=2.1.0
pkgrel=5
#epoch=0
pkgdesc="Turns system into file distributing hotspot. Package used for creating the prepared images"
arch=('any')
url="http://librarybox.us"
license=('GPL')
groups=()
depends=(
'python2'
'lighttpd'
'bash'
'start-stop-daemon'
'iw'
'hostapd'
'dnsmasq'
'bridge-utils'
'radvd'
'proftpd'
'php'
'php-cgi'
'avahi'
'php-sqlite'
'lftp'
'wget'
'wireless_tools'
'netctl'
'perl'
'iptables'
'zip'
'unzip'
'cronie'
)
makedepends=()
checkdepends=()
provides=()
optdepends=( )
conflicts=()
replaces=()
backup=()
options=()
install=librarybox-full.install
#full url source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
source=(librarybox-$pkgver.tar.gz
lan_dhcp
lan_piratebox_bridge
piratebox_bridge
librarybox.service
)
#####------- Build options
prepare(){
cd $srcdir/librarybox/piratebox
sed 's|DO_IFCONFIG="yes"|DO_IFCONFIG="no"|' -i conf/piratebox.conf
sed 's|IPV6_ENABLE="no"|IPV6_ENABLE="yes"|' -i conf/ipv6.conf
sed 's|USE_APN="yes"|USE_APN="no"|' -i conf/piratebox.conf
sed 's|USE_DNSMASQ="no"|USE_DNSMASQ="yes"|' -i conf/piratebox.conf
#
sed 's|DNSMASQ_INTERFACE="wlan0"|DNSMASQ_INTERFACE="br0"|' -i conf/piratebox.conf
sed 's|BRIDGE="br-lan"|BRIDGE="br0"|' -i conf/piratebox.conf
sed 's:NET=192.168.77:NET=192.168.1:' -i conf/piratebox.conf
#
sed 's:start-stop-daemon \-S \-q \-x radvd:start-stop-daemon \-S \-q \-x /usr/bin/radvd:' -i init.d/piratebox_alt
sed 's|date `c|date -s `c|' -i bin/timesave.sh
sed 's|date +%C%g%m%d%H%M|date|' -i bin/timesave.sh
}
package(){
mkdir -p $pkgdir/opt/
cp -r $srcdir/librarybox/piratebox $pkgdir/opt/
mkdir -p $pkgdir/etc/systemd/system/
cp librarybox.service $pkgdir/etc/systemd/system/
# networking profiles
mkdir -p $pkgdir/etc/netctl
cp lan_dhcp $pkgdir/etc/netctl
cp lan_piratebox_bridge $pkgdir/etc/netctl
cp piratebox_bridge $pkgdir/etc/netctl
}