aboutsummaryrefslogtreecommitdiff
path: root/system/cpu-g
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-09 13:12:17 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-09 13:12:17 -0400
commit0ae649b8b0d5a39369f54dc4e22bab1ec62dea67 (patch)
treef2d364673e4fca84d06cffcb3faa6712fb34d4f6 /system/cpu-g
parent8901517663d75caf4affd86138b5cbc0daecb4cc (diff)
system/cpu-g: Fix permissions.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/cpu-g')
-rw-r--r--system/cpu-g/cpu-g2
-rw-r--r--system/cpu-g/cpu-g.SlackBuild25
2 files changed, 13 insertions, 14 deletions
diff --git a/system/cpu-g/cpu-g b/system/cpu-g/cpu-g
index ed42e19513a55..58eefa6846884 100644
--- a/system/cpu-g/cpu-g
+++ b/system/cpu-g/cpu-g
@@ -1,3 +1,3 @@
#!/bin/sh
cd /usr/share/cpu-g
-python2 cpu-g \ No newline at end of file
+exec python2 cpu-g
diff --git a/system/cpu-g/cpu-g.SlackBuild b/system/cpu-g/cpu-g.SlackBuild
index c1c778cbf2315..d065f4cc770b6 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