updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / systemd-git / PKGBUILD
blobaba7888fd9861c65f41c7066f27f597542b24c55
1 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 pkgname=systemd-git
4 pkgver=20120126
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               --with-pamlibdir=/lib/security \
64               --libdir=/usr/lib \
65               --libexecdir=/usr/lib \
66               --localstatedir=/var \
67               --sysconfdir=/etc \
68               --disable-audit \
69               --disable-gtk
71   make
73   # fix .so links in manpages
74   sed -i 's|\.so halt\.8|.so man8/systemd.halt.8|' man/{halt,reboot,poweroff}.8
75   sed -i 's|\.so systemd\.1|.so man1/systemd.1|' man/init.1
78 package() {
79   cd "$_gitname-build"
81   make DESTDIR="$pkgdir" install
83   # logind wants this
84   install -dm755 "$pkgdir/var/lib/systemd"
86   install -Dm644 "$srcdir/os-release" "$pkgdir/etc/os-release"
87   printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
89   # install external sd-{daemon,readahead} libraries
90   install -m644 -t "$pkgdir/usr/share/doc/systemd" \
91     src/sd-daemon.[ch] \
92     src/readahead/sd-readahead.[ch]
94   # fix systemd-analyze for python2
95   sed -i '1s/python$/python2/' "$pkgdir/usr/bin/systemd-analyze"
97   # rename man pages to avoid conflicts with sysvinit and initscripts
98   cd "$pkgdir/usr/share/man"
100   manpages=(man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
101             man5/{hostname,{vconsole,locale}.conf}.5)
103   for manpage in "${manpages[@]}"; do
104     IFS='/' read section page <<< "$manpage"
105     mv "$manpage" "$section/systemd.$page"
106   done