mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 17:57:13 +08:00
adding laptop-mode-tools, voted in from ccr, ttf-malayalam-fonts
This commit is contained in:
parent
95dc5926e1
commit
8a2e3c8817
49
laptop-mode-tools/PKGBUILD
Normal file
49
laptop-mode-tools/PKGBUILD
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#
|
||||||
|
# Chakra Packages for Chakra, part of chakra-project.org
|
||||||
|
#
|
||||||
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||||
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
60
laptop-mode-tools/laptop-mode
Normal file
60
laptop-mode-tools/laptop-mode
Normal file
@ -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
|
33
ttf-malayalam-fonts/PKGBUILD
Normal file
33
ttf-malayalam-fonts/PKGBUILD
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# Chakra Packages for Chakra, part of chakra-project.org
|
||||||
|
#
|
||||||
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||||
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||||
|
# 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
|
||||||
|
}
|
15
ttf-malayalam-fonts/ttf-malayalam-fonts.install
Normal file
15
ttf-malayalam-fonts/ttf-malayalam-fonts.install
Normal file
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user