Browse Source

ap/laptop-mode-tools: Removed.

slackware-14.2
Damien Goutte-Gattat 9 years ago
parent
commit
b59c30d165
  1. 18
      ap/laptop-mode-tools/doinst.sh
  2. 113
      ap/laptop-mode-tools/laptop-mode-tools.SlackBuild
  3. 1
      ap/laptop-mode-tools/laptop-mode-tools_1.53.tar.gz.sha1
  4. 12
      ap/laptop-mode-tools/slack-desc

18
ap/laptop-mode-tools/doinst.sh

@ -1,18 +0,0 @@
#!/bin/bash
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
for CONF in etc/laptop-mode/*.new \
etc/laptop-mode/conf.d/*.new \
etc/rc.d/rc.laptop-mode.new
do
config $CONF
done

113
ap/laptop-mode-tools/laptop-mode-tools.SlackBuild

@ -1,113 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009,2010 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest laptop-mode-tools sourcecode is available at:
# <http://samwel.tk/laptop_mode/>.
# Source package infos
NAMESRC=${NAMESRC:-laptop-mode-tools}
VERSION=${VERSION:-1.53}
ARCHIVE=${ARCHIVE:-${NAMESRC}_$VERSION.tar.gz}
WGET=${WGET:-http://samwel.tk/laptop_mode/tools/downloads/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-laptop-mode-tools}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Build
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
mkdir -p $PKG/etc/rc.d
cp -R usr $PKG
if [ "x$ARCH" = 'xx86_64' -a -d $PKG/usr/lib ]; then
mv $PKG/usr/lib $PKG/usr/lib64
fi
cp -R etc/acpi $PKG/etc
cp -R etc/laptop-mode $PKG/etc
chmod 755 $PKG/etc/acpi/actions/*
install -m 644 etc/init.d/laptop-mode $PKG/etc/rc.d/rc.laptop-mode.new
# Prevent overwritting of existing configuration files
for CONF in $PKG/etc/laptop-mode/conf.d/*.conf $PKG/etc/laptop-mode/*.conf
do
mv $CONF $CONF.new
done
# Install and compress man pages
mkdir -p $PKG/usr/man/man8
install -m 644 man/* $PKG/usr/man/man8
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 Documentation/* COPYING README $PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

1
ap/laptop-mode-tools/laptop-mode-tools_1.53.tar.gz.sha1

@ -1 +0,0 @@
5ffea012c56a0717735f3e37ac235e010847e1e7 laptop-mode-tools_1.53.tar.gz

12
ap/laptop-mode-tools/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler------------------------------------------------------|
laptop-mode-tools: laptop-mode-tools (Tools for power savings)
laptop-mode-tools:
laptop-mode-tools: Laptop mode is a Linux kernel feature that allows your
laptop-mode-tools: laptop to save considerable power, by allowing the hard
laptop-mode-tools: drive to spin down for longer periods of time. This package
laptop-mode-tools: contains the userland scripts that are needed to enable
laptop-mode-tools: laptop mode. It includes support for automatically enabling
laptop-mode-tools: laptop mode when the computer is working on batteries.
laptop-mode-tools:
laptop-mode-tools:
laptop-mode-tools:
Loading…
Cancel
Save