added tdepowersave

added LDFLAGS to amarok.SlackBuild and edited i18n routine
pull/25/head
Ray-V 5 years ago
parent 90dd3fd1d7
commit 0b272f1d9c

@ -49,12 +49,14 @@ sed -i '/tde_create_handbook/,+3d' doc/??{,_??}/CMakeLists.txt || true
#
# set support for additional language(s) as per I18N variable
# but only for languages available with this package
langs="" # the *.po file list
lpos="" # the *.po files list
langs="" # the languages
ldocs="" # the help docs
for Lang in $I18N
do
[[ -d po/$Lang ]] && {
langs="$langs $Lang/$PRGNAM.po"
lpos="$lpos $Lang/$PRGNAM.po"
langs="$langs $Lang"
## ... and restore help documentation for the selected and available locales
[[ -e doc/$Lang/CMakeLists.txt ]] && {
[[ $Lang == ru ]] && NOINDEX=NOINDEX
@ -64,8 +66,7 @@ ldocs="$ldocs $Lang"
}
done
#
sed -i "s|\${po_files}|$langs|" po/CMakeLists.txt
langs=$(echo $langs|sed "s|/$PRGNAM.po||g")
sed -i "s|\${po_files}|$lpos|" po/CMakeLists.txt
[[ $langs != "" ]] && TRANS=ON
listdocs_fn
@ -84,6 +85,10 @@ cd_builddir_fn
# Yauap does NOT handle the mp3 format.
[[ -s $(which yauap) ]] && YAUAP="ON"
## Error: .../arm-slackware-linux-gnueabi/bin/ld: cannot find -ldbus-tqt-1
## Ref: /usr/share/cmake-3.10/Help/envvar/LDFLAGS.rst - add LDFLAGS=
#
LDFLAGS=$SLKLDFLAGS \
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS $TQT_INCLUDE_PATH" \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
@ -108,15 +113,6 @@ cmake \
-DBUILD_TRANSLATIONS=${TRANS:-"OFF"} \
..
<<'Comment'
Error:
[ 99%] Linking CXX shared module libamarok_yauap-engine_plugin.so
/usr/lib/gcc/arm-slackware-linux-gnueabi/7.1.0/../../../../arm-slackware-linux-gnueabi/bin/ld: cannot find -ldbus-tqt-1
Workaround:
Point the build to the exact location ..
Comment
[[ ${YAUAP:-} == ON ]] && sed -i "s|-ldbus-tqt-1|$INSTALL_TDE/lib$LIBDIRSUFFIX/libdbus-tqt-1.so.0.0.0|" amarok/src/engine/yauap/CMakeFiles/libamarok_yauap-engine_plugin-module.dir/link.txt
make_fn
installdocs_fn
@ -139,7 +135,7 @@ echo "
$PRGNAM: Amarok music player for TDE
$PRGNAM:
$PRGNAM: With language support for:
$PRGNAM: en $langs
$PRGNAM: en$langs
$PRGNAM:
$PRGNAM: With help documentation for:
$PRGNAM: en$ldocs

@ -103,8 +103,8 @@ $PRGNAM:
$PRGNAM: With language support for:
$PRGNAM: en $langs
$PRGNAM:
$PKGNAM: With help documentation for:
$PKGNAM: en$ldocs
$PRGNAM: With help documentation for:
$PRGNAM: en$ldocs
$PRGNAM:
$PRGNAM:
" > $PKG/install/slack-desc

@ -0,0 +1,119 @@
#!/bin/sh
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Eric Hameleers, Eindhoven, Netherlands
# Copyright 2015-2017 Thorn Inurcide
# Copyright 2015-2017 tde-slackbuilds project on GitHub
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all
# copies.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
# CONTRIBUTORS 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.
PRGNAM=tdepowersave
VERSION=${VERSION:-$TDEVERSION}
BUILD=${BUILD:-1}
TAG=${TAG:-_tde}
source ../../get-source.sh
getsource_fn
untar_fn
## remove help documentation build instruction from all [non-en] locales ...
sed -i '/tde_create_handbook/,+3d' doc/??{,_??}/CMakeLists.txt || true
# .. restore for en always
echo 'tde_create_handbook( LANG en DESTINATION tdepowersave )' >> doc/en/CMakeLists.txt
#
# set support for additional language(s) as per I18N variable
# but only for languages available with this package
lpos="" # the *.po files list
langs="" # the languages
ldocs="" # the help docs - there is no doc locale without a corresponding po locale
# so can be set within the po loop
for Lang in $I18N
do
[[ -s po/$Lang.po ]] && {
lpos="$lpos $Lang.po"
langs="$langs $Lang"
## ... and restore help documentation for the selected and available locales
[[ -s doc/$Lang/CMakeLists.txt ]] && {
echo "tde_create_handbook( LANG $Lang DESTINATION $PRGNAM )" >> doc/$Lang/CMakeLists.txt
ldocs="$ldocs $Lang"
}
}
done
#
## this GLOB overrides "LANG auto" in po/CMakeLists.txt:
sed -i "s|\*.po|$lpos|" cmake/modules/TDEMacros.cmake
[[ $lpos != "" ]] && TRANS=ON
listdocs_fn
chown_fn
cd_builddir_fn
## /usr/bin/ld: cannot find -ldbus-1-tqt, firstly for a library, then for executable
## Needs all <TYPE>_LINKER_FLAGS_INIT strings, so just set LDFLAGS ..
## Ref: /usr/share/cmake-3.10/Help/envvar/LDFLAGS.rst
LDFLAGS=$SLKLDFLAGS \
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS $TQT_INCLUDE_PATH" \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_C_COMPILER=$COMPILER \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DMAN_INSTALL_DIR=$INSTALL_TDE/man \
-DBUILD_DOC="ON" \
-DBUILD_TRANSLATIONS=${TRANS:-"OFF"} \
..
make_fn
installdocs_fn
mangzip_fn
strip_fn
mkdir_install_fn
doinst_sh_fn
echo "
# 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 ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: Use TDEPowersave, the TDE front-end to powersave, to control power
$PRGNAM: management and monitor laptop battery strength. For example, the
$PRGNAM: screen on a laptop can be configured to turn off if the computer is
$PRGNAM: not used for a specified amount of time, extending battery life.
$PRGNAM:
$PRGNAM: With language support for:
$PRGNAM: en$langs
$PRGNAM:
$PRGNAM: With help documentation for:
$PRGNAM: en$ldocs
$PRGNAM:
" > $PKG/install/slack-desc
makepkg_fn

@ -456,6 +456,7 @@ Non-TDE apps are in the Misc category and don't need the \Zb\Zr\Z4R\Znequired TD
"Apps/tde-style-lipstik" "Lipstik theme" off "\Zb\Z6 \Zn" \
"Apps/tde-style-qtcurve" "QtCurve theme" off "\Zb\Z6 \Zn" \
"Apps/tdeio-locate" "TDE frontend for the locate command" off "\Zb\Z6 \Zn" \
"Apps/tdepowersave" "Set power consumption and conservation options" off "\Zb\Z6 \Zn" \
"Apps/tdesudo" "Graphical frontend for the sudo command" off "\Zb\Z6 \Zn" \
"Apps/tdmtheme" "TDM theme editor module" off "\Zb\Z6 \Zn" \
"Apps/twin-style-crystal" "Twin theme" off "\Zb\Z6 \Zn" \

@ -245,7 +245,7 @@ cd $TMP_BUILD/tmp-$PRGNAM
##
[[ $TDEVERSION == 14.0.? || $TDEMIR_SUBDIR == misc ]] && {
## unpack R14 or misc
echo -e " unpacking $(basename $SOURCE) ... \n"
echo -e "\n unpacking $(basename $SOURCE) ... \n"
tar -xf $SOURCE
true # if this fails, go to [4] and let SlackBuild fail from there
} || {
@ -254,7 +254,7 @@ true # if this fails, go to [4] and let SlackBuild fail from there
##
[[ $TDEVERSION == r14.0.? ]] && {
## unpack r14
echo -e " unpacking $(basename $SOURCE) ... \n"
echo -e "\n unpacking $(basename $SOURCE) ... \n"
tar -xf $SOURCE
## unpack all needed common sources ..
(cd $PRGNAM-$TDEVERSION
@ -273,7 +273,7 @@ true # if this fails, go to [4] and let SlackBuild fail from there
##
## [3] not [rR]14 nor misc, so must be cgit ..
## copy git repo but don't copy .git directory:
echo -e " copying $PRGNAM source files to build area ... \n"
echo -e "\n copying $PRGNAM source files to build area ... \n"
(cd $BUILD_TDE_ROOT/src/cgit
cp -a --parents $PRGNAM/* $TMP_BUILD/tmp-$PRGNAM/
cp -a --parents {admin,cmake}/* $TMP_BUILD/tmp-$PRGNAM/$PRGNAM/

Loading…
Cancel
Save