mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
system/cpu-g: Fix permissions.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
8901517663
commit
0ae649b8b0
2 changed files with 13 additions and 14 deletions
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd /usr/share/cpu-g
|
||||
python2 cpu-g
|
||||
exec python2 cpu-g
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue