From 8a2e3c88174ee5c138226aa1889a9ff6a471adb0 Mon Sep 17 00:00:00 2001 From: abveritas Date: Thu, 2 Jun 2011 19:59:00 +0000 Subject: [PATCH] adding laptop-mode-tools, voted in from ccr, ttf-malayalam-fonts --- laptop-mode-tools/PKGBUILD | 49 +++++++++++++++ laptop-mode-tools/laptop-mode | 60 +++++++++++++++++++ ttf-malayalam-fonts/PKGBUILD | 33 ++++++++++ .../ttf-malayalam-fonts.install | 15 +++++ 4 files changed, 157 insertions(+) create mode 100644 laptop-mode-tools/PKGBUILD create mode 100644 laptop-mode-tools/laptop-mode create mode 100644 ttf-malayalam-fonts/PKGBUILD create mode 100644 ttf-malayalam-fonts/ttf-malayalam-fonts.install diff --git a/laptop-mode-tools/PKGBUILD b/laptop-mode-tools/PKGBUILD new file mode 100644 index 000000000..a162af01a --- /dev/null +++ b/laptop-mode-tools/PKGBUILD @@ -0,0 +1,49 @@ +# +# Chakra Packages for Chakra, part of chakra-project.org +# +# maintainer (i686): Phil Miller +# maintainer (x86_64): Manuel Tortosa + +pkgname=laptop-mode-tools +pkgver=1.57 +pkgrel=1 +pkgdesc="Laptop mode is a kernel mode that allows you to extend the battery life of your laptop" +arch=('any') +url="http://www.samwel.tk/laptop_mode/" +license=('GPL') +depends=('bash' 'hdparm') +optdepends=('acpid: for ACPI support') +backup=(etc/laptop-mode/conf.d/ac97-powersave.conf + etc/laptop-mode/conf.d/auto-hibernate.conf + etc/laptop-mode/conf.d/battery-level-polling.conf + etc/laptop-mode/conf.d/bluetooth.conf + etc/laptop-mode/conf.d/configuration-file-control.conf + etc/laptop-mode/conf.d/cpufreq.conf + etc/laptop-mode/conf.d/dpms-standby.conf + etc/laptop-mode/conf.d/eee-superhe.conf + etc/laptop-mode/conf.d/ethernet.conf + etc/laptop-mode/conf.d/exec-commands.conf + etc/laptop-mode/conf.d/hal-polling.conf + etc/laptop-mode/conf.d/intel-hda-powersave.conf + etc/laptop-mode/conf.d/intel-sata-powermgmt.conf + etc/laptop-mode/conf.d/lcd-brightness.conf + etc/laptop-mode/conf.d/sched-mc-power-savings.conf + etc/laptop-mode/conf.d/sched-smt-power-savings.conf + etc/laptop-mode/conf.d/start-stop-programs.conf + etc/laptop-mode/conf.d/terminal-blanking.conf + etc/laptop-mode/conf.d/usb-autosuspend.conf + etc/laptop-mode/conf.d/video-out.conf + etc/laptop-mode/conf.d/wireless-ipw-power.conf + etc/laptop-mode/conf.d/wireless-iwl-power.conf + etc/laptop-mode/conf.d/wireless-power.conf + etc/laptop-mode/laptop-mode.conf + etc/laptop-mode/lm-profiler.conf) +source=(http://www.samwel.tk/laptop_mode/tools/downloads/${pkgname}_${pkgver}.tar.gz laptop-mode) +md5sums=('1d9e4f4e3ff3f16d298e1653483f3f58' 'fe47441f14e2b39c2fe473685f04395f') + +package() { + cd "${srcdir}/${pkgname}_${pkgver}" + sed -i 's|etc/udev|lib/udev|' install.sh + make DESTDIR="${pkgdir}" INIT_D=none MAN_D=/usr/share/man install + install -D -m755 "${srcdir}/laptop-mode" "${pkgdir}/etc/rc.d/laptop-mode" +} diff --git a/laptop-mode-tools/laptop-mode b/laptop-mode-tools/laptop-mode new file mode 100644 index 000000000..3825d3bb0 --- /dev/null +++ b/laptop-mode-tools/laptop-mode @@ -0,0 +1,60 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + if [ -x /etc/rc.d/acpid ]; then + ck_daemon acpid && /etc/rc.d/acpid start + fi + stat_busy "Starting laptop-mode" + [ ! -d /var/run/laptop-mode-tools ] && install -d /var/run/laptop-mode-tools + touch /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode auto >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon laptop-mode + stat_done + fi + ;; + stop) + stat_busy "Stopping laptop-mode" + rm -f /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode stop >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon laptop-mode + stat_done + fi + ;; + restart) + stat_busy "Restarting laptop-mode" + rm -f /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode stop >/dev/null 2>&1 + + if [ $? -gt 0 ]; then + stat_fail + rm_daemon laptop-mode + else + rm -f /var/run/laptop-mode-tools/* + touch /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode auto force >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + rm_daemon laptop-mode + else + stat_done + fi + fi + ;; + status) + /usr/sbin/laptop_mode status + ;; + *) + echo "Usage: $0 {stop|start|restart|status}" + ;; +esac +exit 0 diff --git a/ttf-malayalam-fonts/PKGBUILD b/ttf-malayalam-fonts/PKGBUILD new file mode 100644 index 000000000..d592c0919 --- /dev/null +++ b/ttf-malayalam-fonts/PKGBUILD @@ -0,0 +1,33 @@ +# +# Chakra Packages for Chakra, part of chakra-project.org +# +# maintainer (i686): Phil Miller +# maintainer (x86_64): Manuel Tortosa +# ontributor CCR: Sebin A Jacob sebinajacob at gmail dot com +# ontributor AUR: Aashik S aashiks at gmail dot com + +pkgname=ttf-malayalam-fonts +# This variable had to be introduced to deal with the peculiar naming scheme and +# the directory structure of the source when extracted folder +pkgver="4.4" +pkgrel=1 +pkgdesc=" This is a set of TrueType and OpenType fonts released under the GNU General Public License for Malayalam Language." +arch=('i686' 'x86_64') +url="http://smc.org.in/" +license=('GPL') +depends=('fontconfig' 'xorg-fonts-encodings') +install=ttf-malayalam-fonts.install +source=(http://download.savannah.gnu.org/releases-noredirect/smc/fonts/malayalam-fonts-${pkgver}.zip) +md5sums=('02f06d0e7e387bd7c549967b2494104e') + + +build() { + cd "${srcdir}/malayalam-fonts-${pkgver}" || return 1 + mkdir -p "${pkgdir}/usr/share/fonts/TTF" || return 1 + for f in `ls ./*/*.ttf` + do + install -m644 $f "${pkgdir}/usr/share/fonts/TTF" + done + mkdir -p "${pkgdir}/etc/fonts/conf.d" || return 1 + install *.conf "${pkgdir}/etc/fonts/conf.d" || return 1 +} diff --git a/ttf-malayalam-fonts/ttf-malayalam-fonts.install b/ttf-malayalam-fonts/ttf-malayalam-fonts.install new file mode 100644 index 000000000..26e912fe9 --- /dev/null +++ b/ttf-malayalam-fonts/ttf-malayalam-fonts.install @@ -0,0 +1,15 @@ +post_install() { + echo "Running fc-cache to update font cache" + fc-cache -fs + mkfontscale usr/share/fonts/TTF + mkfontdir usr/share/fonts/TTF + echo "Finished updating font cache" +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +}