summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorfreaj <freaj@riseup.net>2015-03-23 11:06:59 +0100
committerfreaj <freaj@riseup.net>2015-03-23 11:06:59 +0100
commitb037a18227d53ba17d0c4ce6152f86404286b393 (patch)
treec97474614d647863854f7c086090ce68f019d15b /pcr
parent5750e4530f54d27b384cda41d329044ffa55c8b7 (diff)
downloadabslibre-b037a18227d53ba17d0c4ce6152f86404286b393.tar.gz
abslibre-b037a18227d53ba17d0c4ce6152f86404286b393.tar.bz2
abslibre-b037a18227d53ba17d0c4ce6152f86404286b393.zip
eudev: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/eudev/PKGBUILD63
-rwxr-xr-xpcr/eudev/initcpio_hooks20
-rwxr-xr-xpcr/eudev/initcpio_install27
3 files changed, 110 insertions, 0 deletions
diff --git a/pcr/eudev/PKGBUILD b/pcr/eudev/PKGBUILD
new file mode 100644
index 000000000..095bb04d5
--- /dev/null
+++ b/pcr/eudev/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer : freaj <freaj@riseup.net>
+# Maintainer (Manjaro): artoo <artoo@manjaro.org>
+# Contributor (Manjaro): Alexey D. <lq07829icatm@rambler.ru>
+# Contributor (Manjaro): Ivailo Monev <xakepa10@gmail.com>
+
+_udev_ver=217
+_src_uri='http://dev.gentoo.org/~blueness/eudev'
+
+pkgname=eudev
+pkgver=2.1.1
+pkgrel=3
+pkgdesc="The userspace dev tools (udev) forked by Gentoo"
+arch=('i686' 'x86_64')
+url="http://www.gentoo.org/proj/en/eudev/"
+license=('GPL')
+depends=('glib2' 'kbd' 'kmod' 'hwids' 'util-linux')
+makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool')
+optdepends=('eudev-systemdcompat: makes packages compiled with systemd features run'
+ 'upower-pm-utils: pm-utils support')
+provides=("udev=${_udev_ver}"
+ "libudev=${_udev_ver}"
+ 'libgudev-1.0.so'
+ 'libudev.so')
+conflicts=('libgudev-1.0.so' 'libudev.so')
+backup=('etc/udev/udev.conf')
+options=(!makeflags !libtool)
+source=("${_src_uri}/${pkgname}-${pkgver}.tar.gz"
+ 'initcpio_hooks'
+ 'initcpio_install')
+sha256sums=('6aef101c5496a2dc45e669307d478dbccb0ee0462a285512edcda51ff12e0e6a'
+ '892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13'
+ '1a70e48d5f5b476ed624f745b03988f2e8950e33ae864c6b1c4ef088882c8390')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure \
+ --prefix=/usr \
+ --with-rootprefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --with-modprobe=/usr/bin/modprobe \
+ --with-html-dir=/usr/share/doc/${pkgname}-${pkgver}/html \
+ --enable-gudev \
+ --enable-introspection \
+ --enable-split-usr \
+ --enable-rule-generator
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ for i in "${pkgdir}/usr/lib/udev/rules.d/"*.rules; do
+ sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
+ s#GROUP="tape"#GROUP="storage"#g;
+ s#GROUP="cdrom"#GROUP="optical"#g' "${i}"
+ done
+
+ install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
+ install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"
+}
diff --git a/pcr/eudev/initcpio_hooks b/pcr/eudev/initcpio_hooks
new file mode 100755
index 000000000..75da7e4a8
--- /dev/null
+++ b/pcr/eudev/initcpio_hooks
@@ -0,0 +1,20 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ udevd --daemon --resolve-names=never
+ udevd_running=1
+}
+
+run_hook() {
+ msg ":: Triggering uevents..."
+ udevadm trigger --action=add --type=subsystems
+ udevadm trigger --action=add --type=devices
+ udevadm settle
+}
+
+run_cleanuphook() {
+ udevadm control --exit
+ udevadm info --cleanup-db
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/pcr/eudev/initcpio_install b/pcr/eudev/initcpio_install
new file mode 100755
index 000000000..9c1ac6da3
--- /dev/null
+++ b/pcr/eudev/initcpio_install
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+build() {
+ add_file "/etc/udev/udev.conf"
+ add_binary /usr/bin/udevd
+ add_binary /usr/bin/udevadm
+
+ for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers-modprobe.rules; do
+ add_file "/usr/lib/udev/rules.d/$rule"
+ done
+
+ for tool in ata_id scsi_id; do
+ add_file "/usr/lib/udev/$tool"
+ done
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook will use udev to create your root device node and detect the needed
+modules for your root device. It is also required for firmware loading in
+initramfs. It is recommended to use this hook.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: