Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b3659b8cbe
Fetching contributors…

Cannot retrieve contributors at this time

file 127 lines (108 sloc) 4.657 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
# Maintainer: Dave Reisner <dreisner@archlinux.org>

pkgname=systemd-git
pkgver=20120730
pkgrel=1
pkgdesc="system and service manager"
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
depends=('acl' 'dbus-core' 'glib2' 'hwids' 'kbd' 'kmod' 'libcap' 'pam' 'util-linux' 'xz')
makedepends=('docbook-xsl' 'git' 'gobject-introspection' 'gperf'
             'gtk-doc' 'intltool' 'libxslt' 'python2')
optdepends=('cryptsetup: required for encrypted block devices'
            'python-cairo: systemd-analyze'
            'python-dbus: systemd-analyze'
            'systemd-arch-units: collection of native unit files for Arch daemon/init scripts')
provides=('systemd' 'libsystemd' 'systemd-sysvcompat' 'systemd-tools' 'udev=999')
conflicts=('systemd' 'libsystemd' 'systemd-sysvcompat' 'systemd-tools' 'sysvinit' 'initscripts' 'udev')
groups=('systemd')
options=('!libtool')
backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf
        etc/dbus-1/system.d/org.freedesktop.hostname1.conf
        etc/dbus-1/system.d/org.freedesktop.login1.conf
        etc/dbus-1/system.d/org.freedesktop.locale1.conf
        etc/dbus-1/system.d/org.freedesktop.timedate1.conf
        etc/systemd/system.conf
        etc/systemd/user.conf
        etc/systemd/logind.conf
        etc/systemd/journald.conf
        etc/udev/udev.conf)
install='systemd.install'
source=('use-split-usr-path.patch'
        'locale.sh'
        'initcpio-hook-udev'
        'initcpio-install-udev'
        'initcpio-install-timestamp')
md5sums=('482dba45a783f06c2239f1355f4ce72f'
         'f15956945052bb911e5df81cf5e7e5dc'
         'e99e9189aa2f6084ac28b8ddf605aeb8'
         '59e91c4d7a69b7bf12c86a9982e37ced'
         'df69615503ad293c9ddf9d8b7755282d')

_gitroot="git://anongit.freedesktop.org/systemd/systemd.git"
_gitname="systemd"

build() {
  msg "Connecting to GIT server...."

  if [[ -d $_gitname ]] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  patch -Np1 <"$srcdir/use-split-usr-path.patch"

  ./autogen.sh
  ./configure \
      PYTHON=python2 \
      --libexecdir=/usr/lib \
      --localstatedir=/var \
      --sysconfdir=/etc \
      --enable-introspection \
      --enable-gtk-doc \
      --disable-audit \
      --disable-ima \
      --with-pamlibdir=/usr/lib/security \
      --with-distro=arch \
      --with-firmware-path=/usr/lib/firmware/updates:/usr/lib/firmware \
      --with-sysvinit-path= \
      --with-sysvrcd-path= \
      --with-usb-ids-path=/usr/share/hwdata/usb.ids \
      --with-pci-ids-path=/usr/share/hwdata/pci.ids

  make
}

package() {
  make -C "$_gitname-build" DESTDIR="$pkgdir" install

  printf "d /run/console 0755 root root\n" >"$pkgdir/usr/lib/tmpfiles.d/console.conf"

  # compat symlinks
  install -dm755 "$pkgdir"/{,s}bin
  ln -s ../usr/lib/systemd/systemd "$pkgdir/bin/systemd"

  install -dm755 "$pkgdir/sbin"
  for tool in runlevel reboot shutdown poweroff halt telinit; do
    ln -s '/usr/bin/systemctl' "$pkgdir/sbin/$tool"
  done
  ln -s '../usr/lib/systemd/systemd' "$pkgdir/sbin/init"

  # systemd-wide user locale
  install -Dm755 "$srcdir/locale.sh" "$pkgdir/etc/profile.d/locale.sh"

  # fix .so links in manpage stubs
  find "$pkgdir/usr/share/man" -type f -name '*.[[:digit:]]' \
      -exec sed -ri '1s|^\.so (.*)\.([0-9]+)|.so man\2/\1.\2|' {} +

  # move bash-completion and symlink for loginctl
  install -Dm644 "$pkgdir/etc/bash_completion.d/systemd-bash-completion.sh" \
      "$pkgdir/usr/share/bash-completion/completions/systemctl"
  ln -s systemctl "$pkgdir/usr/share/bash-completion/completions/loginctl"
  rm -rf "$pkgdir/etc/bash_completion.d"

  # don't write units to /etc by default
  rm "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service"
  rmdir "$pkgdir/etc/systemd/system/getty.target.wants"

  # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
  sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g' \
         -e 's#GROUP="tape"#GROUP="storage"#g' \
         -e 's#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules

  # add mkinitcpio hooks
  install -Dm644 "$srcdir/initcpio-install-timestamp" "$pkgdir/usr/lib/initcpio/install/timestamp"
  install -Dm644 "$srcdir/initcpio-install-udev" "$pkgdir/usr/lib/initcpio/install/udev"
  install -Dm644 "$srcdir/initcpio-hook-udev" "$pkgdir/usr/lib/initcpio/hooks/udev"
}
Something went wrong with that request. Please try again.