summaryrefslogtreecommitdiffstats
path: root/sddm
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-05-16 13:20:55 +0000
committer Eric Hameleers <alien@slackware.com>2013-05-16 13:20:55 +0000
commit1fd39ebfe928008941f849d8e11f37f1133b5d80 (patch)
tree583eaf9e92f67a0a86f432ab6a5934289a3208e8 /sddm
parent527af41898c358f0fafbabd922e39fcc4b94926d (diff)
downloadasb-1fd39ebfe928008941f849d8e11f37f1133b5d80.tar.gz
asb-1fd39ebfe928008941f849d8e11f37f1133b5d80.tar.xz
Strip the KDE specifics from the script.
Diffstat (limited to 'sddm')
-rwxr-xr-xsddm/build/sddm.SlackBuild60
1 files changed, 45 insertions, 15 deletions
diff --git a/sddm/build/sddm.SlackBuild b/sddm/build/sddm.SlackBuild
index 31583f6d..c0eda439 100755
--- a/sddm/build/sddm.SlackBuild
+++ b/sddm/build/sddm.SlackBuild
@@ -20,21 +20,48 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+PKGNAM=sddm
+VERSION=${VERSION:-20130516git}
+TAG=${TAG:-alien}
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ MARCH=$( uname -m )
+ if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-sddm
-# Set the config option variables if they are not already set:
-if [ -r ./KDE.options ]; then
- . ./KDE.options
-fi
-
-# The global options may be overridden here (if needed):
-if [ -r ./local.options ]; then
- . ./local.options
-fi
-
# Avoid a version number in .la files:
if [ -d /usr/lib${LIBDIRSUFFIX}/qt ]; then
QTDIR=/usr/lib${LIBDIRSUFFIX}/qt
@@ -53,6 +80,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Compile and install:
mkdir -p build
cd build
cmake \
@@ -68,24 +96,26 @@ cd build
make install DESTDIR=$PKG || exit 1
cd -
-if [ -d $PKG/usr/man ]; then
- gzip -9 $PKG/usr/man/man?/*
-fi
+# Do not clobber existing configuration files:
+mv $PKG/etc/sddm.conf{,.new}
+# Add documentation:
mkdir -p $PKG/usr/doc/sddm-$VERSION
cp -a \
AUTHORS COPYING* ChangeLog HACKING* NEWS README* TODO \
$PKG/usr/doc/sddm-$VERSION
+# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Add package description and post-install script:
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-#zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $TMP/sddm-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/sddm-$VERSION-$ARCH-$BUILD$TAG.txz