[Slackbuilds-users] zarfy SlackBuild installs data into /usr/share not /tmp/SBo/...
Richard
richard at aaazen.com
Tue Jan 27 02:51:30 UTC 2015
On Tue, 27 Jan 2015, Willy Sudiarto Raharjo wrote:
> can you send the patch in form of a file instead of inline?
Sure.
Richard Narron
richard at aaazen.com
---------------------------------------------------------------------
Birth, n.:
The first and direst of all disasters.
-- Ambrose Bierce, "The Devil's Dictionary"
-------------- next part --------------
#!/bin/sh
# Slackware build script for zarfy
# Copyright 2006-2011 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
# Maintained by Marc Dix
PRGNAM=zarfy
VERSION=${VERSION:-0.1.0}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
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 \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p0 < $CWD/patch-makefile-in
patch -p0 < $CWD/patch-src-makefile-in
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-lm -lX11" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--libexec=/usr/lib \
--enable-shared=yes \
--enable-static=no \
--enable-debug=no \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING ChangeLog INSTALL NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
-------------- next part --------------
--- Makefile.in.orig 2008-09-13 06:05:07.000000000 -0700
+++ Makefile.in 2015-01-26 08:13:00.780325974 -0800
@@ -612,24 +612,24 @@
install-data-local:
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(pkgdatadir); \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \
for fname in data/*; do \
if test -f $$fname; then \
- $(INSTALL_DATA) $$fname $(pkgdatadir); \
+ $(INSTALL_DATA) $$fname $(DESTDIR)$(pkgdatadir); \
fi \
done;
- $(mkinstalldirs) $(mandir)/man1; \
- $(INSTALL_DATA) man/zarfy.1.gz $(mandir)/man1
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1; \
+ $(INSTALL_DATA) man/zarfy.1.gz $(DESTDIR)$(mandir)/man1
uninstall-local:
@$(NORMAL_UNINSTALL)
- for fname in $(pkgdatadir)/*; do \
+ for fname in $(DESTDIR)$(pkgdatadir)/*; do \
if test -f $$fname; then \
rm $$fname; \
fi \
done; \
- rmdir $(pkgdatadir); \
- rm $(mandir)/man1/zarfy.*
+ rmdir $(DESTDIR)$(pkgdatadir); \
+ rm $(DESTDIR)$(mandir)/man1/zarfy.*
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-------------- next part --------------
--- src/Makefile.in.orig 2008-09-13 06:05:07.000000000 -0700
+++ src/Makefile.in 2015-01-26 08:28:52.276310733 -0800
@@ -200,7 +200,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ test -z "$(DESTDIR)$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
-------------- next part --------------
zarfy is a gui to libxrandr. It presents the user with a visual
representaion of active displays on an interactive map of the
screen memory. It features free positioning, configuration saving,
scripting for R&R, and an alternate gui for switching monitors.
More information about the SlackBuilds-users
mailing list