CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
exim: initial import (verified compilation)
[crossrootfs.git] / exim / Pkgfile
1 # Description: Mail transfer agent
2 # URL: http://www.exim.org
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: db openssl libpcre tcp_wrappers
6
7 name=exim
8 version=4.76
9 release=1
10 source=(ftp://ftp.exim.org/pub/exim/exim4/$name-$version.tar.bz2 \
11 $name $name-config.patch)
12
13 build() {
14 cd $name-$version
15
16 sed "s/#CFLAGS#/$CFLAGS/" $SRC/$name-config.patch | patch -p1
17 cp src/EDITME Local/Makefile
18
19 # build native binaries with host cc
20 sed 's|buildname=.*|buildname=Linux-arm|' -i Makefile
21 make -j1 configure
22 cd build-Linux-arm && gcc -Wall -o buildconfig buildconfig.c && cd -
23
24 make -j1 \
25 ARCHTYPE="arm" \
26 AR="$CTARGET-ar cq" \
27 RANLIB="$CTARGET-ranlib" \
28 CC="$CTARGET-gcc"
29
30 sed -i scripts/exim_install -e "s|version=.*$|version=\"exim-$version-$release\"|"
31 sed -i scripts/exim_install -e "/awk .*/d"
32
33 make DESTDIR=$PKG install
34
35 install -D -m 755 $SRC/exim $PKG/etc/rc.d/exim
36 install -D -m 644 doc/exim.8 $PKG/usr/man/man8/exim.8
37
38 install -d $PKG/var/{log,spool} $PKG/usr/bin
39 install -d -m 0750 -o mail -g mail $PKG/var/{log,spool}/exim
40
41 touch $PKG/var/log/exim/exim_{mainlog,paniclog,rejectlog}
42 chown mail:mail $PKG/var/log/exim/*
43 chmod 640 $PKG/var/log/exim/*
44
45 ln -sf $name-$version-1 $PKG/usr/sbin/sendmail
46 ln -sf ../sbin/$name-$version-1 $PKG/usr/bin/mailq
47 }