1 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
5 pkgdesc="a web-based interface for system administration"
7 license=('custom:webmin')
8 url="http://www.webmin.com/"
9 depends=('perl' 'perl-perl4-corelibs')
10 makedepends=('perl-net-ssleay')
11 backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' 'etc/webmin/webmin.cats' \
12 'etc/webmin/pacman/config' \
13 'etc/webmin/at/config' \
14 'etc/webmin/acl/config' \
15 'etc/webmin/lvm/config' \
16 'etc/webmin/net/config' \
17 'etc/webmin/nis/config' \
18 'etc/webmin/pam/config' \
19 'etc/webmin/cron/config' \
20 'etc/webmin/file/config' \
21 'etc/webmin/grub/config' \
22 'etc/webmin/init/config' \
23 'etc/webmin/ipfw/config' \
24 'etc/webmin/lilo/config' \
25 'etc/webmin/proc/config' \
26 'etc/webmin/raid/config' \
27 'etc/webmin/spam/config' \
28 'etc/webmin/sshd/config' \
29 'etc/webmin/time/config' \
30 'etc/webmin/cluster-passwd/config' \
31 'etc/webmin/software/config' \
32 'etc/webmin/webminlog/config' \
33 'etc/webmin/cluster-webmin/config' \
34 'etc/webmin/bind8/config' \
35 'etc/webmin/dhcpd/config' \
36 'etc/webmin/fdisk/config' \
37 'etc/webmin/mount/config' \
38 'etc/webmin/mysql/config' \
39 'etc/webmin/quota/config' \
40 'etc/webmin/samba/config' \
41 'etc/webmin/shell/config' \
42 'etc/webmin/squid/config' \
43 'etc/webmin/adsl-client/config' \
44 'etc/webmin/servers/config' \
45 'etc/webmin/cluster-shell/config' \
46 'etc/webmin/bandwidth/config' \
47 'etc/webmin/ppp-client/config' \
48 'etc/webmin/lpadmin/config' \
49 'etc/webmin/apache/config' \
50 'etc/webmin/firewall/config' \
51 'etc/webmin/stunnel/config' \
52 'etc/webmin/burner/config' \
53 'etc/webmin/exports/config' \
54 'etc/webmin/backup-config/config' \
55 'etc/webmin/custom/config' \
56 'etc/webmin/htaccess-htpasswd/config' \
57 'etc/webmin/logrotate/config' \
58 'etc/webmin/format/config' \
59 'etc/webmin/fsdump/config' \
60 'etc/webmin/passwd/config' \
61 'etc/webmin/cluster-useradmin/config' \
62 'etc/webmin/cluster-software/config' \
63 'etc/webmin/cluster-copy/config' \
64 'etc/webmin/cluster-cron/config' \
65 'etc/webmin/telnet/config' \
66 'etc/webmin/status/config' \
67 'etc/webmin/syslog/config' \
68 'etc/webmin/updown/config' \
69 'etc/webmin/usermin/config' \
70 'etc/webmin/webmin/config' \
71 'etc/webmin/xinetd/config' \
72 'etc/webmin/openslp/config' \
73 'etc/webmin/procmail/config' \
74 'etc/webmin/fetchmail/config' \
75 'etc/webmin/postgresql/config' \
76 'etc/webmin/useradmin/config' \
77 'etc/webmin/mailboxes/config' \
78 'etc/webmin/inittab/config' \
79 'etc/webmin/change-user/config' \
80 'etc/webmin/postfix/config' \
81 'etc/webmin/proftpd/config' \
82 'etc/webmin/pserver/config' \
83 'etc/webmin/dnsadmin/config' )
84 install=webmin.install
85 source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
86 ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2
87 ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2
92 # NOTE: USE --asroot build option to avoid fakeroot error!
93 cd "$srcdir"/$pkgname-$pkgver
94 # add patches from webmin.com
101 # delete stuff that's not needed
102 rm -f mount/freebsd-mounts*
103 rm -f mount/openbsd-mounts*
104 rm -f mount/macos-mounts*
106 # remove modules we do not support
107 rm -rf {bacula-backup,ldap-useradmin,mon,sentry,frox,jabber,majordomo,qmail,sendmail,sarg,wuftpd,webalizer,inetd,ipsec,pap,pptp-client,pptp-server,shorewall,smart-status,vgetty,heartbeat,cfengine,cpan,sgiexports,hpuxexports,qmailadmin,bsdexports,dfsadmin}
109 #remove config files from other distros
110 rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
112 # remove caldera theme
115 # remove init-scripts from other distros
116 rm webmin-gentoo-init
118 rm webmin-caldera-init
121 # remove update stuff to avoid problems with updating webmin,modules and themes without pacman
122 rm -f webmin/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
123 rm -f usermin/{upgrade.cgi,update.cgi,update.pl,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}
125 # remove modules add because we don't want files installed without pacman control
126 rm -f webmin/{install_mod.cgi,delete_mod.cgi}
129 (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
132 mkdir -p "$pkgdir"/opt/webmin
133 mkdir -p "$pkgdir"/var/log/webmin
134 mkdir -p "$pkgdir"/etc/webmin
137 install -D -m 644 webmin-pam "$pkgdir"/etc/pam.d/webmin
139 # remove other distros and add only Archlinux don't change next line else it will not work!
141 echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt
143 # Add rc.conf support to boot and shutdown menu and lock editing of this module
145 sed -i -e 's:^local_down=.*:local_down=Archlinux RC.CONF,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
146 sed -i -e 's:^local_script=.*:local_script=Archlinux RC.LOCAL,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*')
147 sed -i -e 's:^index_downscript=.*:index_downscript=Archlinux RC.CONF:g' lang/*
148 sed -i -e 's:^index_script=.*:index_script=Archlinux RC.LOCAL:g' lang/*
149 sed -i -e 's:^noconfig=0:noconfig=1:g' defaultacl
152 cd "$srcdir"/$pkgname-$pkgver
153 cp -rf custom/ pacman
154 cp -rf mscstyle3/custom mscstyle3/pacman
155 sed -i -e 's:^noconfig=0:noconfig=1:g' -e 's:^edit=1:edit=0:g' pacman/defaultacl
156 sed -i -e '/desc/d' -e '/longdesc/d' pacman/module.info
157 sed -i -e 's:^name=Custom:name=Pacman:g' pacman/module.info
158 echo 'category=system' >> pacman/module.info
159 echo 'desc=Pacman' >> pacman/module.info
160 sed -i -e 's:^index_title=.*:index_title=Pacman:g' pacman/lang/*
162 # copy stuff to right dirs
163 cd "$srcdir"/$pkgname-$pkgver
164 cp -rp * "$pkgdir"/opt/webmin
165 cd "$srcdir"/webmin-config
166 cp -rfp * "$pkgdir"/opt/webmin
168 # define parameters for setup.sh
169 config_dir="$pkgdir"/etc/webmin
170 var_dir="$pkgdir"/var/log/webmin
184 tempdir="$pkgdir"/tmp
185 export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn
188 sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/webmin/setup.sh
189 "$pkgdir"/opt/webmin/setup.sh
191 # Fixup the config files to use their real locations
192 sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' "$pkgdir"/etc/webmin/miniserv.conf
193 find "$pkgdir"/etc/webmin -type f -exec sed -i "s:$pkgdir::g" {} \;
195 # make it only accessible by localhost
196 echo 'allow=127.0.0.1' >> "$pkgdir"/etc/webmin/miniserv.conf
198 # install pacman menu
199 cd "$srcdir"/webmin-pacman/config
200 cp -rfp * "$pkgdir"/etc/webmin/pacman
202 # install systemd files
203 install -D -m 644 $srcdir/webmin.service $pkgdir/usr/lib/systemd/system/webmin.service
208 chmod 0644 $pkgdir/opt/webmin/man/config-generic-linux
210 install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE
214 md5sums=('cf270b18644884b1c791ba963d9a630d'
215 'b0b3e3fb231a12e60165b6b4d604dcfa'
216 'bfebb75bb94029b48c46b7f1ba1aa811'
217 'fc29ecb6a5cd8c278abe054e60381095')