summaryrefslogtreecommitdiff
path: root/packages/dev-libs/libcgroup/libcgroup.exlib
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dev-libs/libcgroup/libcgroup.exlib')
-rw-r--r--packages/dev-libs/libcgroup/libcgroup.exlib75
1 files changed, 75 insertions, 0 deletions
diff --git a/packages/dev-libs/libcgroup/libcgroup.exlib b/packages/dev-libs/libcgroup/libcgroup.exlib
new file mode 100644
index 0000000..89338d0
--- /dev/null
+++ b/packages/dev-libs/libcgroup/libcgroup.exlib
@@ -0,0 +1,75 @@
+# Copyright 2010-2017 Wulf C. Krueger <philantrop@exherbo.org>
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+require sourceforge [ project="libcg" ]
+require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.13 ] ]
+
+export_exlib_phases pkg_postinst src_prepare
+
+SUMMARY="libcg is a library that abstracts the control group file system in Linux"
+DESCRIPTION="
+libcgroup aims to provide programmers easily usable APIs to use the control group
+file system. It should satisfy the following requirements:
+- Provide a programmable interface for cgroups
+- Provide persistent configuration across reboots
+- Provide a programmable interface for manipulating configurations
+"
+
+#BUGS_TO="philantrop@exherbo.org"
+
+UPSTREAM_DOCUMENTATION="${HOMEPAGE}/html/index.html [[ lang = en ]]"
+
+LICENCES="LGPL-2.1"
+SLOT="0"
+MYOPTIONS=""
+
+DEPENDENCIES="
+ build+run:
+ sys-libs/pam
+"
+
+# The tests since 0.38 want to mess directly with /sys *and* expect libcgroup to
+# be already installed. Last checked: 0.41
+RESTRICT="test"
+
+DEFAULT_SRC_CONFIGURE_PARAMS=(
+ --enable-cgred-socket=/run/cgred.sock
+ --enable-daemon
+ --enable-pam
+ --enable-shared
+ --enable-static
+ --enable-tools
+)
+
+DEFAULT_SRC_CONFIGURE_PARAMS=( --enable-opaque-hierarchy=name=systemd )
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/${PNV}-replace_DECLS.patch
+ "${FILES}"/${PNV}-replace_INLCUDES.patch
+ "${FILES}"/${PNV}-reorder-headers.patch
+)
+
+libcgroup_src_prepare() {
+ # Change rules file location
+ edo sed -e 's:/etc/cgrules.conf:/etc/cgroup/cgrules.conf:' \
+ -i src/libcgroup-internal.h
+ edo sed -e 's:/etc/cgconfig.conf:/etc/cgroup/cgconfig.conf:' \
+ -i src/libcgroup-internal.h
+ edo sed -e 's:\(pam_cgroup_la_LDFLAGS.*\):\1\ -avoid-version:' \
+ -i src/pam/Makefile.am
+ edo sed -e 's#/var/run#/run#g' -i configure.in || die "sed failed"
+ autotools_src_prepare
+}
+
+libcgroup_pkg_postinst() {
+ default
+
+ local cruft=( /etc/rc.d/init.d/cgconfig /etc/rc.d/init.d/cgred )
+ for file in ${cruft[@]}; do
+ if test -f "${file}" ; then
+ nonfatal edo rm "${file}" || ewarn "removing ${file} failed"
+ fi
+ done
+}
+