updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / systemd-git / PKGBUILD
blob652d8c6a02c34b193fdf1295d0f0b74d8c598482
1 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 pkgname=systemd-git
4 pkgver=20120115
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-rootlibdir=/lib \
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   install -Dm644 "$srcdir/os-release" "$pkgdir/etc/os-release"
84   printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
86   # install external sd-{daemon,readahead} libraries
87   install -m644 -t "$pkgdir/usr/share/doc/systemd" \
88     src/sd-daemon.[ch] \
89     src/readahead/sd-readahead.[ch]
91   # fix systemd-analyze for python2
92   sed -i '1s/python$/python2/' "$pkgdir/usr/bin/systemd-analyze"
94   # rename man pages to avoid conflicts with sysvinit and initscripts
95   cd "$pkgdir/usr/share/man"
97   manpages=(man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
98             man5/{hostname,{vconsole,locale}.conf}.5)
100   for manpage in "${manpages[@]}"; do
101     IFS='/' read section page <<< "$manpage"
102     mv "$manpage" "$section/systemd.$page"
103   done