[arch-commits] Commit in systemd/trunk (PKGBUILD locale.sh)

Tom Gundersen tomegun at archlinux.org
Tue May 29 18:15:15 UTC 2012


    Date: Tuesday, May 29, 2012 @ 14:15:15
  Author: tomegun
Revision: 160064

merge systemd-sysvcompat

we do this in order to ship the relevant manpages with the symlinks package. otherwise
these would have to be renamed to avoid conflicting with the sysvinit ones.

Added:
  systemd/trunk/locale.sh
Modified:
  systemd/trunk/PKGBUILD

-----------+
 PKGBUILD  |   46 +++++++++++++++++++++++++++++-----------------
 locale.sh |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-05-29 15:21:08 UTC (rev 160063)
+++ PKGBUILD	2012-05-29 18:15:15 UTC (rev 160064)
@@ -1,9 +1,9 @@
 # Maintainer: Dave Reisner <dreisner at archlinux.org>
 
 pkgbase=systemd
-pkgname=('systemd' 'libsystemd' 'systemd-tools')
+pkgname=('systemd' 'libsystemd' 'systemd-tools' 'systemd-sysvcompat')
 pkgver=183
-pkgrel=5
+pkgrel=6
 arch=('i686' 'x86_64')
 url="http://www.freedesktop.org/wiki/Software/systemd"
 license=('GPL2' 'LGPL2.1' 'MIT')
@@ -15,13 +15,15 @@
         'initcpio-install-udev'
         'initcpio-install-timestamp'
         '0001-Reinstate-TIMEOUT-handling.patch'
-        'os-release')
+        'os-release'
+        'locale.sh')
 md5sums=('e1e5e0f376fa2a4cb4bc31a2161c09f2'
          'e99e9189aa2f6084ac28b8ddf605aeb8'
          '59e91c4d7a69b7bf12c86a9982e37ced'
          'df69615503ad293c9ddf9d8b7755282d'
          '5543be25f205f853a21fa5ee68e03f0d'
-         '752636def0db3c03f121f8b4f44a63cd')
+         '752636def0db3c03f121f8b4f44a63cd'
+         'f15956945052bb911e5df81cf5e7e5dc')
 
 build() {
   cd "$pkgname-$pkgver"
@@ -89,18 +91,6 @@
   find "$pkgdir/usr/share/man" -type f -name '*.[[:digit:]]' \
       -exec sed -i '1s|^\.so \(.*\)\.\([[:digit:]]\+\)|.so man\2/\1.\2|' {} +
 
-  # rename man pages to avoid conflicts with sysvinit and initscripts
-  cd "$pkgdir/usr/share/man"
-
-  manpages=(man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8
-            man5/{hostname,{vconsole,locale}.conf}.5)
-
-  for manpage in "${manpages[@]}"; do
-    IFS='/' read section page <<< "$manpage"
-    mv "$manpage" "$section/systemd.$page"
-  done
-  sed -i '1s|/\([^/]\+\)|/systemd.\1|' "$pkgdir"/usr/share/man/man8/systemd.{poweroff,reboot}.8
-
   # 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"
@@ -120,6 +110,12 @@
   mv "$pkgdir/usr/include/systemd" usr/include
   mv "$pkgdir/usr/lib/pkgconfig"/libsystemd-*.pc usr/lib/pkgconfig
 
+  ### split out manpages for sysvcompat
+  rm -rf "$srcdir/_sysvcompat"
+  install -dm755 "$srcdir"/_sysvcompat/usr/share/man/man8/
+  mv "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
+     "$srcdir"/_sysvcompat/usr/share/man/man8
+
   ### split out systemd-tools/udev
   rm -rf "$srcdir/_tools"
   install -dm755 \
@@ -152,14 +148,30 @@
   mv "$pkgdir"/usr/share/gir-1.0 usr/share
   mv "$pkgdir"/usr/share/gtk-doc/html/{g,lib}udev usr/share/gtk-doc/html
   mv "$pkgdir"/usr/share/man/man7/udev.7 usr/share/man/man7
-  mv "$pkgdir"/usr/share/man/man5/systemd.vconsole.conf.5 usr/share/man/man5
   mv "$pkgdir"/usr/share/man/man8/{systemd-udevd,udevadm}.8 usr/share/man/man8
   mv "$pkgdir"/usr/share/man/man1/systemd-{ask-password,delta,detect-virt}.1 usr/share/man/man1
   mv "$pkgdir"/usr/share/man/man5/{binfmt,modules-load,sysctl,tmpfiles}.d.5 usr/share/man/man5
+  mv "$pkgdir"/usr/share/man/man5/{hostname,{vconsole,locale}.conf}.5 usr/share/man/man5
   mv "$pkgdir"/usr/bin/systemd-{ask-password,delta,detect-virt,tmpfiles,tty-ask-password-agent} usr/bin
   mv "$pkgdir"/usr/lib/systemd/systemd-{ac-power,binfmt,cryptsetup,modules-load,random-seed,remount-fs,reply-password,sysctl,timestamp,vconsole-setup} usr/lib/systemd
 }
 
+package_systemd-sysvcompat() {
+  pkgdesc="sysvinit compat for systemd"
+  conflicts=('sysvinit' 'initscripts')
+
+  mv "$srcdir/_sysvcompat"/* "$pkgdir"
+
+  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"
+
+  install -Dm755 "$srcdir/locale.sh" "$pkgdir/etc/profile.d/locale.sh"
+}
+
 package_libsystemd() {
   pkgdesc="systemd client libraries"
   depends=('xz')

Added: locale.sh
===================================================================
--- locale.sh	                        (rev 0)
+++ locale.sh	2012-05-29 18:15:15 UTC (rev 160064)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+if [ ! -r /etc/locale.conf ]; then
+  return
+fi
+
+. /etc/locale.conf
+
+if [ "${LANG+x}" = 'x' ]; then
+  export LANG
+fi
+
+if [ "${LC_CTYPE+x}" = 'x' ]; then
+  export LC_CTYPE
+fi
+
+if [ "${LC_NUMERIC+x}" = 'x' ]; then
+  export LC_NUMERIC
+fi
+
+if [ "${LC_TIME+x}" = 'x' ]; then
+  export LC_TIME
+fi
+
+if [ "${LC_COLLATE+x}" = 'x' ]; then
+  export LC_COLLATE
+fi
+
+if [ "${LC_MONETARY+x}" = 'x' ]; then
+  export LC_MONETARY
+fi
+
+if [ "${LC_MESSAGES+x}" = 'x' ]; then
+  export LC_MESSAGES
+fi
+
+if [ "${LC_PAPER+x}" = 'x' ]; then
+  export LC_PAPER
+fi
+
+if [ "${LC_NAME+x}" = 'x' ]; then
+  export LC_NAME
+fi
+
+if [ "${LC_ADDRESS+x}" = 'x' ]; then
+  export LC_ADDRESS
+fi
+
+if [ "${LC_TELEPHONE+x}" = 'x' ]; then
+  export LC_TELEPHONE
+fi
+
+if [ "${LC_MEASUREMENT+x}" = 'x' ]; then
+  export LC_MEASUREMENT
+fi
+
+if [ "${LC_IDENTIFICATION+x}" = 'x' ]; then
+  export LC_IDENTIFICATION
+fi
+




More information about the arch-commits mailing list