1 # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
5 pkgdesc="a web interface that can be used to easily perform tasks like reading mail, setting up SSH or configuring mail forwarding"
7 license=('custom:usermin')
8 url="http://www.webmin.com/"
9 depends=('perl' 'webmin')
10 makedepends=('perl-net-ssleay')
11 backup=('etc/usermin/miniserv.conf' 'etc/usermin/miniserv.users' 'etc/usermin/config' 'etc/usermin/usermin.cats' \
12 'etc/usermin/at/config' \
13 'etc/usermin/man/config' \
14 'etc/usermin/ssh/config' \
15 'etc/usermin/chfn/config' \
16 'etc/usermin/cron/config' \
17 'etc/usermin/file/config' \
18 'etc/usermin/plan/config' \
19 'etc/usermin/proc/config' \
20 'etc/usermin/spam/config' \
21 'etc/usermin/htaccess/config' \
22 'etc/usermin/cshrc/config' \
23 'etc/usermin/gnupg/config' \
24 'etc/usermin/mysql/config' \
25 'etc/usermin/quota/config' \
26 'etc/usermin/shell/config' \
27 'etc/usermin/theme/config' \
28 'etc/usermin/mailbox/config' \
29 'etc/usermin/schedule/config' \
30 'etc/usermin/config' \
31 'etc/usermin/commands/config' \
32 'etc/usermin/htaccess-htpasswd/config' \
33 'etc/usermin/forward/config' \
34 'etc/usermin/telnet/config' \
35 'etc/usermin/tunnel/config' \
36 'etc/usermin/updown/config' \
37 'etc/usermin/procmail/config' \
38 'etc/usermin/fetchmail/config' \
39 'etc/usermin/changepass/config' \
40 'etc/usermin/language/config' \
41 'etc/usermin/postgresql/config' \
42 'etc/usermin/usermount/config' \
44 install=usermin.install
45 source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
47 ftp://ftp.archlinux.org/other/usermin/usermin-config.tar.bz2)
50 cd "$srcdir"/$pkgname-$pkgver
52 # remove modules we do not support
54 #remove config files from other distros
55 rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
57 # remove caldera theme
60 # remove init-scripts from other distros
65 (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
68 mkdir -p "$pkgdir"/opt/usermin
69 mkdir -p "$pkgdir"/var/log/usermin
70 mkdir -p "$pkgdir"/etc/usermin
73 install -D -m 644 usermin-pam "$pkgdir"/etc/pam.d/usermin
75 # remove other distros and add only Archlinux don't change next line else it will not work!
77 echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt
79 # copy stuff to right dirs
80 cd "$srcdir"/$pkgname-$pkgver
81 cp -rp * "$pkgdir"/opt/usermin
82 cd "$srcdir"/usermin-config
83 cp -rfp * "$pkgdir"/opt/usermin
85 # define parameters for setup.sh
86 config_dir="$pkgdir"/etc/usermin
87 var_dir="$pkgdir"/var/log/usermin
101 tempdir="$pkgdir"/tmp
102 export config_dir var_dir perl autoos port tempdir ssl nochown autothird nouninstall nostart noperlpath atbootyn login crypt
105 sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/usermin/setup.sh
106 "$pkgdir"/opt/usermin/setup.sh
108 # Fixup the config files to use their real locations
109 sed -i 's:^pidfile=.*$:pidfile=/var/run/usermin.pid:' "$pkgdir"/etc/usermin/miniserv.conf
110 find "$pkgdir"/etc/usermin -type f -exec sed -i "s:$pkgdir::g" {} \;
112 # make it only accessible by localhost
113 echo 'allow=127.0.0.1' >> "$pkgdir"/etc/usermin/miniserv.conf
115 # enable user and password login
116 sed -i -e '/localauth/d' "$pkgdir"/etc/usermin/miniserv.conf
118 #install systemd service file
119 install -D -m 644 "$srcdir"/usermin.service "$pkgdir"/usr/lib/systemd/system/usermin.service
124 install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/usermin/LICENCE
126 md5sums=('d73f0696e2644034f1ec8202b9f020be'
127 'a5bd5e5ee779f8a3cf3d776ca77ee36e'
128 'ec37a79f948f778224550930d2a7ca07')