diff options
author | Deposite Pirate | 2018-09-16 18:48:36 +0200 |
---|---|---|
committer | Deposite Pirate | 2018-09-16 18:48:36 +0200 |
commit | d150a5f3e462fa7fe194a805a4aa0076f4d03ab9 (patch) | |
tree | ce5e44d69c5f3175bfdbd1e3717b52c5dcca5638 /base/power/power.build | |
parent | f29d3519ce073ec30f99754d93304324f7f26d65 (diff) |
Add ports.
Diffstat (limited to 'base/power/power.build')
-rwxr-xr-x | base/power/power.build | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/base/power/power.build b/base/power/power.build new file mode 100755 index 0000000..f8a8215 --- /dev/null +++ b/base/power/power.build @@ -0,0 +1,145 @@ +#!/bin/bash +# +# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd> + +source /usr/src/ports/Build/build.sh + +NAME=power +VERSION=0.9.19 +BUILD=2 +DEPENDS=('glib >= 2.34.3-1' 'dbus_glib >= 0.100.2-1' 'udev >= 173-1' 'polkit >= 0.105-1' 'usb >= 1.0.14-1') + +# Description + +cat > ${PKG}/install/slack-desc <<EOF +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + +$(padd)|-----handy-ruler------------------------------------------------------| +${NAME}: upower +${NAME}: +${NAME}: An abstraction for enumerating power devices, listening to device +${NAME}: events and querying history and statistics. Any application or +${NAME}: service on the system can access the org.freedesktop.UPower service +${NAME}: via the system message bus. Some operations (such as suspending the +${NAME}: system) are restricted using polkit. UPower is also useful to control +${NAME}: the latency of different operations on your computer, which enables +${NAME}: you to save significant amounts of power. +${NAME}: +${NAME}: Homepage: http://upower.freedesktop.org +EOF + +cat >> ${PKG}/install/doinst.sh <<EOF +#!/bin/sh + +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/UPower/UPower.conf.new +EOF + +# Sources + +SRCNAME[0]=upower +SRCVERS[0]=${VERSION} +SRCPACK[0]=http://upower.freedesktop.org/releases/${SRCNAME[0]}-${SRCVERS[0]}.tar.xz +SRCCOPY[0]="GPL2" + +build0() +{ +sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in +sed -i 's|$(slashlibdir)/udev/rules.d|$(datarootdir)/udev/rules|g' rules/Makefile.in +CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ +./configure \ + --build="${ARCH}-slackware-linux" \ + --disable-dependency-tracking \ + --disable-silent-rules \ + --disable-rpath \ + --enable-static=no \ + --enable-shared=yes \ + --enable-introspection=no \ + --enable-man-pages=no \ + --prefix="${SYS_DIR[usr]}" \ + --mandir="${SYS_DIR[man]}" \ + --sysconfdir="${SYS_DIR[etc]}" \ + --libdir="${SYS_DIR[lib]}" \ + --libexecdir="${SYS_DIR[lib]}/exec" \ + --localstatedir="${SYS_DIR[var]}" \ + --with-html-dir="${SYS_DIR[html]}" \ + --with-systemdsystemunitdir="${SYS_DIR[systemdsystemunitdir]}" \ + --with-backend=linux +#FIXME: systemd +make ${JOBS} V=1 +make install DESTDIR="${PKG}" +doc AUTHORS +changelog NEWS +config ${PKG}${SYS_DIR[etc]}/UPower/UPower.conf +} + +SRCNAME[1]=cpufrequtils +SRCVERS[1]=008 +SRCPACK[1]=http://www.kernel.org/pub/linux/utils/kernel/cpufreq/${SRCNAME[1]}-${SRCVERS[1]}.tar.bz2 +SRCCOPY[1]="GPL2" + +build1() +{ +make ${JOBS} \ + V="true" \ + PROC="false" \ + OPTIMIZATION="${FLAGS}" +make install DESTDIR="${PKG}" libdir="${SYS_DIR[lib]}" +doc AUTHORS +rm -f ${PKG}${SYS_DIR[lib]}/*.a +} + +SRCNAME[2]=pm-utils +SRCVERS[2]=1.4.1 +SRCPACK[2]=http://pm-utils.freedesktop.org/releases/${SRCNAME[2]}-${SRCVERS[2]}.tar.gz +SRCCOPY[2]="GPL2" + +PMUTILSLIBDIR=${SYS_DIR[share]}/pm-utils + +build2() +{ +sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in +CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ +./configure \ + --build="${ARCH}-slackware-linux" \ + --disable-dependency-tracking \ + --prefix="${SYS_DIR[usr]}" \ + --mandir="${SYS_DIR[man]}" \ + --sysconfdir="${SYS_DIR[etc]}" \ + --libdir="${SYS_DIR[share]}" \ + --localstatedir="${SYS_DIR[var]}" \ + --docdir="${SYS_DIR[doc]}/${SRCNAME[2]}-${SRCVERS[2]}" +make ${JOBS} +make install DESTDIR="${PKG}" +doc AUTHORS README.SLACKWARE +changelog ChangeLog +rm -f ${PKG}${PMUTILSLIBDIR}/{sleep.d/55NetworkManager,power.d/{harddrive,disable_wol,hal-cd-polling}} +} + +SRCNAME[3]=pm-quirks +SRCVERS[3]=20100619 +SRCPACK[3]=http://pm-utils.freedesktop.org/releases/${SRCNAME[3]}-${SRCVERS[3]}.tar.gz +SRCROOT[3]=video-quirks + +build3() +{ +install.dir ${PKG}${PMUTILSLIBDIR}/video-quirks +install.dat *.quirkdb ${PKG}${PMUTILSLIBDIR}/video-quirks +} |