SHARE
TWEET

lvm2-git/device-mapper-git

a guest Jul 13th, 2013 34 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # $Id: PKGBUILD 187034 2013-06-03 11:15:24Z allan $
  2. # Maintainer: Eric Bélanger <eric@archlinux.org>
  3. # Maintainer: Thomas Bächler <thomas@archlinux.org>
  4.  
  5. pkgbase=lvm2
  6. pkgname=('lvm2-git' 'device-mapper-git')
  7. pkgver=2.02.98
  8. pkgrel=4
  9. arch=('i686' 'x86_64')
  10. url="http://sourceware.org/lvm2/"
  11. license=('GPL2' 'LGPL2.1')
  12. makedepends=('systemd')
  13. groups=('base')
  14. source=(git://git.fedorahosted.org/lvm2.git
  15.         lvm2_install
  16.         lvm2_hook
  17.         11-dm-initramfs.rules
  18.         lvm2.conf
  19.         dmeventd.service
  20.         dmeventd.socket
  21.         lvm-monitoring.service
  22.         lvmetad.service
  23.         lvmetad.socket)
  24. sha1sums=('SKIP'
  25.           '76e83966d1bc84f9a1e30bcaff84b8b8fefbca0f'
  26.           'ff0fdf0a3005a41acd4b36865056109effc3474b'
  27.           'f6a554eea9557c3c236df2943bb6e7e723945c41'
  28.           'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4'
  29.           '01782ce8e10718c1513e3906b126f30f682f5cab'
  30.           '1d56f47a81350ae37ffbf61ee036fe31f4c5d504'
  31.           'adf26f5e5636de9c055b2ac3b179641a543a8937'
  32.           'f857a4a63fcc604a981e56875edda91767d4f1bf'
  33.           'fcfc265e3b10294cc4b10949a342e9db4310b186')
  34.  
  35. pkgver() {
  36.     cd "$pkgbase"
  37.     git describe | sed 's/^v//;s/-/./g'
  38. }
  39.  
  40. build() {
  41.   cd "${srcdir}/${pkgbase}"
  42.   unset LDFLAGS
  43.  
  44.   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin \
  45.     --with-udev-prefix=/usr --with-systemdsystemunitdir=/usr/lib/systemd/system \
  46.     --with-default-pid-dir=/run --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm \
  47.     --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \
  48.     --enable-udev_sync --enable-udev_rules --with-default-locking-dir=/run/lock/lvm \
  49.     --enable-lvmetad
  50.   make
  51. }
  52.  
  53. package_device-mapper-git() {
  54.   pkgdesc="Device mapper userspace library and tools"
  55.   url="http://sourceware.org/dm/"
  56.   depends=('glibc' 'systemd')
  57.   conflicts=('device-mapper')
  58.   provides=('device-mapper')
  59.  
  60.   cd "${srcdir}/${pkgbase}"
  61.   make DESTDIR="${pkgdir}" install_device-mapper
  62.   # extra udev rule for device-mapper in initramfs
  63.   install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules"
  64.   # Install dmeventd socket and service
  65.   install -D -m644 "${srcdir}/dmeventd.service" "${pkgdir}/usr/lib/systemd/system/dmeventd.service"
  66.   install -D -m644 "${srcdir}/dmeventd.socket" "${pkgdir}/usr/lib/systemd/system/dmeventd.socket"
  67.   install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
  68.   ln -sf /usr/lib/systemd/system/dmeventd.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket"
  69. }
  70.  
  71. package_lvm2-git() {
  72.   pkgdesc="Logical Volume Manager 2 utilities"
  73.   depends=('bash' "device-mapper-git>=${pkgver}" 'systemd' 'readline')
  74.   conflicts=('lvm' 'lvm2' 'mkinitcpio<0.7')
  75.   provides=('lvm2')
  76.   backup=('etc/lvm/lvm.conf')
  77.   options=('!makeflags')
  78.   install=lvm2.install
  79.  
  80.   cd "${srcdir}/${pkgbase}"
  81.   make DESTDIR="${pkgdir}" install_lvm2
  82.   # install applib
  83.   make -C liblvm DESTDIR="${pkgdir}" install
  84.   # /etc directories
  85.   install -d "${pkgdir}"/etc/lvm/{archive,backup}
  86.   # mkinitcpio hook
  87.   install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/usr/lib/initcpio/hooks/lvm2"
  88.   install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
  89.   # systemd support
  90.   install -D -m644 "${srcdir}/lvm2.conf" "${pkgdir}/usr/lib/tmpfiles.d/lvm2.conf"
  91.   install -D -m644 "${srcdir}/lvm-monitoring.service" "${pkgdir}/usr/lib/systemd/system/lvm-monitoring.service"
  92.   install -D -m644 "${srcdir}/lvmetad.service" "${pkgdir}/usr/lib/systemd/system/lvmetad.service"
  93.   install -D -m644 "${srcdir}/lvmetad.socket" "${pkgdir}/usr/lib/systemd/system/lvmetad.socket"
  94.   install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
  95.   ln -sf /usr/lib/systemd/system/lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket"
  96.   # enable lvmetad
  97.   sed 's|use_lvmetad = 0|use_lvmetad = 1|' -i "${pkgdir}/etc/lvm/lvm.conf"
  98. }
RAW Paste Data
Top