1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Maintainer: Edward Tjörnhammar <xhemi@cube2.se>
3 # Contributor: Edward Tjörnhammar <xhemi@cube2.se>
8 pkgdesc="Complete open source Usenet system. De facto standard for handling news routing, news spool and serving the spool to customers."
9 url="https://www.isc.org/othersoftware/"
11 license=("custom:INN")
12 depends=('openssl' 'perl-mime-tools' 'perl-gd' 'pam' 'db5.3')
13 makedepends=('make' 'bison' 'python' 'gcc' 'smtp-forwarder' 'libsasl' 'sqlite')
14 optdepends=('python' 'libsasl'
15 'sqlite: ovsqlite-server')
16 options=(emptydirs docs zipman)
18 backup=(etc/inn/innwatch.ctl
22 etc/inn/innshellvars.tcl.local
23 etc/inn/buffindexed.conf
26 etc/inn/innshellvars.local
27 etc/inn/inn-radius.conf
33 etc/inn/control.ctl.local
35 etc/inn/motd.innd.sample
37 etc/inn/innshellvars.pl.local
39 etc/inn/innreport.conf
44 etc/inn/motd.nnrpd.sample
51 etc/inn/inn-secrets.conf
54 var/db/inn/active.times
56 var/db/inn/history.dir
57 var/db/inn/history.hash
58 var/db/inn/history.index
59 var/db/inn/newsgroups)
60 validpgpkeys=('E784364E8DDE7BB370FBD9EAD15D313882004173')
61 source=(https://ftp.isc.org/isc/inn/inn-$pkgver.tar.gz{,.asc}
65 sha256sums=('e8e0ca77f60f950f1747c82f72697dd7c2697bc691b46f7562056255795d93f4'
67 'b8658c900f5bce5d0b09b595496137e5f3e93bbcdc1fb1f751783e6e2873de21'
68 'f58a06718396628bf110de21c052cf29c0d2e7bd0c7bd645d43b592b6ac549d4'
69 'a8c269bc006eb39a140af1538a0812c54ea11f444867c28f5e9792bfdd4df71a')
72 cd "$srcdir"/inn-$pkgver
73 # Override unreproducible hostname
74 sed -i 's/HOSTNAME=`hostname 2> \/dev\/null || uname -n`/HOSTNAME=archlinux/' configure
75 sed -i 's/-ldb/-ldb-5.3/g' configure
79 cd "$srcdir"/inn-$pkgver
80 CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
81 PYTHON=/usr/bin/python ./configure --prefix=/usr \
82 --includedir=/usr/include/inn \
86 --with-bdb-include=/usr/include/db5.3 \
87 --with-db-dir=/var/db/inn \
88 --sysconfdir=/etc/inn \
89 --with-spool-dir=/var/spool/news \
90 --with-log-dir=/var/log/inn \
91 --with-run-dir=/var/run/inn \
92 --with-tmp-dir=/var/spool/inn/tmp \
97 --with-sendmail=/usr/bin/msmtp \
101 # See https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database
102 test -f include/config.h
103 cat >>include/config.h <<EOF
105 #define RUNASUSER "news"
107 #define RUNASGROUP "news"
113 cd "$srcdir"/inn-$pkgver
114 export LD_LIBRARY_PATH=.:"$pkgdir"/usr/lib:$LD_LIBRARY_PATH
116 make DESTDIR="$pkgdir" install
120 gcc -shared -o ${i%%.a}.so.2.0.0 $i
122 ln -s ${i%%a}so.2.0.0 ${i%%a}so.$j
126 touch "$pkgdir"/var/db/inn/history{.dir,.hash,.index,}
128 mkdir -p "$pkgdir"/usr/share/doc/inn "$pkgdir"/usr/share/inn/
129 # mv "$pkgdir"/usr/share/man/man3/list.3 "$pkgdir"/usr/share/man/man3/list-inn.3
130 mv "$pkgdir"/usr/doc/* "$pkgdir"/usr/share/doc/inn/
131 mv "$pkgdir"/usr/http/* "$pkgdir"/usr/share/inn/
132 mv "$pkgdir"/usr/bin/archive "$pkgdir"/usr/bin/archive.inn
133 rm -rf "$pkgdir"/usr/doc "$pkgdir"/usr/http "$pkgdir"/var/run
134 install -D -m0644 "$srcdir"/inn-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/inn/LICENSE
135 chown root:root "$pkgdir"/usr/bin/innbind
136 chmod 05555 "$pkgdir"/usr/bin/innbind
138 install -Dm0644 "$srcdir"/innd.service "$pkgdir"/usr/lib/systemd/system/innd.service
139 install -Dm0644 "$srcdir"/inn.sysusers "$pkgdir"/usr/lib/sysusers.d/inn.conf
140 install -Dm0644 "$srcdir"/inn.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/inn.conf