system/zarfy: Fix build outside /tmp/SBo.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Richard Narron 2015-02-01 00:23:37 +07:00 committed by Willy Sudiarto Raharjo
parent 7c7af4dc15
commit dc81844ff9
4 changed files with 54 additions and 9 deletions

View file

@ -1,4 +1,4 @@
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 postioning, configuration saving,
screen memory. It features free positioning, configuration saving,
scripting for R&R, and an alternate gui for switching monitors.

View file

@ -0,0 +1,34 @@
--- 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:

View file

@ -0,0 +1,11 @@
--- 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 \

View file

@ -26,7 +26,7 @@
PRGNAM=zarfy
VERSION=${VERSION:-0.1.0}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -65,13 +65,15 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
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 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" \
@ -91,9 +93,7 @@ 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
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