summaryrefslogtreecommitdiffstats
path: root/system/cpu-g/cpu-g.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/cpu-g/cpu-g.SlackBuild')
-rw-r--r--system/cpu-g/cpu-g.SlackBuild25
1 files changed, 12 insertions, 13 deletions
diff --git a/system/cpu-g/cpu-g.SlackBuild b/system/cpu-g/cpu-g.SlackBuild
index c1c778cbf2..d065f4cc77 100644
--- a/system/cpu-g/cpu-g.SlackBuild
+++ b/system/cpu-g/cpu-g.SlackBuild
@@ -24,18 +24,19 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - fix permissions: binary wasn't executable (!), .desktop was (?).
+# - remove deprecated Encoding from .desktop.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cpu-g
VERSION=${VERSION:-0.9.0}
ARCH=noarch
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -56,24 +57,22 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
mkdir -p $PKG/usr/{bin,share/applications}
mkdir -p $PKG/usr/share/$PRGNAM/data/logos
-cp $CWD/cpu-g $PKG/usr/bin
+install -m0755 $CWD/cpu-g $PKG/usr/bin
cp $TMP/$PRGNAM-$VERSION/{COPYING,README,cpu-g.glade,cpu-g} $PKG/usr/share/$PRGNAM/
cp $TMP/$PRGNAM-$VERSION/data/cpu-g.png $PKG/usr/share/$PRGNAM/data
cp $TMP/$PRGNAM-$VERSION/data/logos/* $PKG/usr/share/$PRGNAM/data/logos
-sed -i "s_^Icon=cpu-g\$_Icon=/usr/share/$PRGNAM/data/cpu-g.png_" "$TMP/$PRGNAM-$VERSION/data/cpu-g.desktop"
-cp $TMP/$PRGNAM-$VERSION/data/cpu-g.desktop $PKG/usr/share/applications/
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+sed -i -e "s_^Icon=cpu-g\$_Icon=/usr/share/$PRGNAM/data/cpu-g.png_" \
+ -e '/^Encoding/d' \
+ "$TMP/$PRGNAM-$VERSION/data/cpu-g.desktop"
+install -m0644 $TMP/$PRGNAM-$VERSION/data/cpu-g.desktop $PKG/usr/share/applications/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/$PRGNAM/{COPYING,README} $PKG/usr/doc/$PRGNAM-$VERSION