updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / systemd-git / PKGBUILD
blobb5c45e9770fe2db250528389a85cdfe0e3ca4842
1 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 pkgname=systemd-git
4 pkgver=20120114
5 pkgrel=1
6 pkgdesc="Session and Startup manager"
7 arch=('i686' 'x86_64')
8 url="http://www.freedesktop.org/wiki/Software/systemd"
9 license=('GPL2')
10 depends=('acl' 'dbus-core' 'kbd' 'libcap' 'udev>=172' 'util-linux>=2.19')
11 makedepends=('cryptsetup' 'docbook-xsl' 'git' 'gperf' 'intltool' 'libxslt'
12              'linux-api-headers' 'xz')
13 optdepends=('cryptsetup: required for encrypted block devices'
14             'dbus-python: systemd-analyze'
15             'initscripts: legacy hostname, locale, and vconsole support'
16             'selinux-usr-libselinux: integration with security enhanced Linux'
17             'systemd-arch-units-git: collection of native unit files for Arch daemon/init scripts'
18             'tcp_wrappers: filter remote access to services')
19 provides=('systemd')
20 conflicts=('systemd')
21 groups=('systemd')
22 options=(!libtool)
23 backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf
24         etc/dbus-1/system.d/org.freedesktop.hostname1.conf
25         etc/dbus-1/system.d/org.freedesktop.login1.conf
26         etc/dbus-1/system.d/org.freedesktop.locale1.conf
27         etc/dbus-1/system.d/org.freedesktop.timedate1.conf
28         etc/systemd/system.conf
29         etc/systemd/user.conf
30         etc/systemd/systemd-logind.conf)
31 install=systemd.install
32 source=('os-release')
33 md5sums=('752636def0db3c03f121f8b4f44a63cd')
35 _gitroot="git://anongit.freedesktop.org/systemd/systemd.git"
36 _gitname="systemd"
38 build() {
39   msg "Connecting to GIT server...."
41   if [[ -d $_gitname ]] ; then
42     cd $_gitname && git pull origin
43     msg "The local files are updated."
44   else
45     git clone $_gitroot $_gitname
46   fi
48   msg "GIT checkout done or server timeout"
49   msg "Starting make..."
51   rm -rf "$srcdir/$_gitname-build"
52   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
53   cd "$srcdir/$_gitname-build"
55   # don't unset locale in getty
56   # https://bugzilla.redhat.com/show_bug.cgi?id=663900
57   sed -i -e '/^Environ.*LANG/s/^/#/' \
58          -e '/^ExecStart/s/agetty/& -8/' units/getty@.service.m4
60   # don't trigger ./configure automatically
61   ./autogen.sh ac
62   ./configure --with-rootprefix= \
63               --libdir=/usr/lib \
64               --libexecdir=/usr/lib \
65               --localstatedir=/var \
66               --sysconfdir=/etc \
67               --disable-audit \
68               --disable-gtk
70   make
72   # fix .so links in manpages
73   sed -i 's|\.so halt\.8|.so man8/systemd.halt.8|' man/{halt,reboot,poweroff}.8
74   sed -i 's|\.so systemd\.1|.so man1/systemd.1|' man/init.1
77 package() {
78   cd "$_gitname-build"
80   make DESTDIR="$pkgdir" install
82   install -Dm644 "$srcdir/os-release" "$pkgdir/etc/os-release"
83   printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
85   # install external sd-{daemon,readahead} libraries
86   install -m644 -t "$pkgdir/usr/share/doc/systemd" \
87     src/sd-daemon.[ch] \
88     src/readahead/sd-readahead.[ch]
90   # fix systemd-analyze for python2
91   sed -i '1s/python$/python2/' "$pkgdir/usr/bin/systemd-analyze"
93   # rename man pages to avoid conflicts with sysvinit and initscripts
94   cd "$pkgdir/usr/share/man"
96   manpages=(man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
97             man5/{hostname,{vconsole,locale}.conf}.5)
99   for manpage in "${manpages[@]}"; do
100     IFS='/' read section page <<< "$manpage"
101     mv "$manpage" "$section/systemd.$page"
102   done