Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-26-2005, 10:33 PM
|
#1
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
question about the XFCE build script
i'd like to know why there's a "make install" used before doing a "make install DESTDIR=$PKG"... shouldn't the "make install DESTDIR=$PKG" be all that's needed?? i mean, won't the "make install" actually mess with my system, instead of staying in the package's build directory??
Code:
#!/bin/sh
# Copyright 2003 Slackware Linux, Inc., Concord, CA, 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.
TMP=/tmp/xfce-build-dir
rm -rf $TMP
mkdir -p $TMP
PKG=$TMP/package-xfce
rm -rf $PKG
mkdir -p $PKG
CWD=`pwd`
VERSION=4.2.2
PKGVER=4.2.2
ARCH=${ARCH:-i486}
BUILD=1
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
for file in \
dbh-1.0.24.tar.bz2 \
libxfce4util-$VERSION.tar.bz2 \
libxfcegui4-$VERSION.tar.bz2 \
libxfce4mcs-$VERSION.tar.bz2 \
xfce-mcs-manager-$VERSION.tar.bz2 \
xfce4-panel-$VERSION.tar.bz2 \
gtk-xfce-engine-2.2.7.tar.bz2 \
xfce-mcs-plugins-$VERSION.tar.bz2 \
xfce-utils-$VERSION.tar.bz2 \
xfce4-appfinder-$VERSION.tar.bz2 \
xfce4-iconbox-$VERSION.tar.bz2 \
xfce4-icon-theme-$VERSION.tar.bz2 \
xfce4-mixer-$VERSION.tar.bz2 \
xfce4-systray-$VERSION.tar.bz2 \
xfce4-session-$VERSION.tar.bz2 \
xfce4-toys-$VERSION.tar.bz2 \
xfce4-trigger-launcher-$VERSION.tar.bz2 \
xfdesktop-$VERSION.tar.bz2 \
xffm-$VERSION.tar.bz2 \
xfprint-$VERSION.tar.bz2 \
xfwm4-$VERSION.tar.bz2 \
xfwm4-themes-$VERSION.tar.bz2 \
xfcalendar-$VERSION.tar.bz2 \
; do
( cd $TMP
tar xjf $CWD/$file
cd `basename $file .tar.bz2`
# Strengthen resistance to /tmp attacks (low risk, but might as well...).
if [ "$file" = "xfce-utils-$VERSION.tar.bz2" ]; then
zcat $CWD/xfce-utils-xinitrc.diff.gz | patch -p1 --verbose
fi
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
# From the COMPOSITOR file in xfwm4:
#
# xfwm4 now features a compositing manager. This code is new and has received only
# a moderate amount of testing, so it's disabled by default.
#
# So, if you want to stay safe, keep the compositor disabled...
#
# If you still want to try the compositor extensions with xfwm4, here follows how
# to enable the compositing manager in xfwm4.
#
# 1) Enabling the compositor manager in xfwm4
# -------------------------------------------
#
# To enable the compositing manager in xfwm4, add --enable-compositor when running
# the configure script.
#
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--sysconfdir=/etc/X11 \
--enable-static=no \
--enable-xinerama
make -j6
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/`basename $file .tar.bz2`
cp -a \
AUTHORS COPYING INSTALL NEWS README TODO \
$PKG/usr/doc/`basename $file .tar.bz2`
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
for mandir in `find . -name man -type d` ; do
if [ -d $mandir ]; then
( cd $mandir
find . -type f -name "*.?" -exec gzip -9 {} \;
)
fi
done
)
)
done
( cd $PKG/usr/bin
ln -sf xffm xffstab4
ln -sf xffm xfapps
ln -sf xffm xfbook
ln -sf xffm xfsamba4
ln -sf xffm xftrash4
ln -sf xffm xfapps4
ln -sf xffm xfbook4
ln -sf xffm xffstab
ln -sf xffm xfglob4
ln -sf xffm xftree4
)
chown -R root.bin $PKG/usr/bin
( mkdir -p $PKG/etc/X11/xinit
cd $PKG/etc/X11/xinit
ln -sf ../xdg/xfce4/xinitrc xinitrc.xfce
chmod 755 ../xdg/xfce4/xinitrc
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/xfce-$PKGVER-$ARCH-$BUILD.tgz
|
|
|
|
11-26-2005, 11:55 PM
|
#2
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Well, there are 23 individual packages that make up the xfce Slack pak. Most of them are deps for one another. If you didn't spam the system so the next package in line could find it, then it wouldn't build.... It all gets overwritten when you install the actuall package. The only thing that annoys me when Pat does this, is that he doesn't gzip the man pages on the system... man directories on slack are really a mess IMO...
So after installing the package you have 2 sets of man pages. One compressed and one not. Other than that, you can't avoid spamming the system like that. I suppose it's the same as trying to make all of KDE into one giant package.
|
|
|
|
11-27-2005, 12:07 AM
|
#3
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
thanks for the reply jong357!! it all makes sense now...
PS: also thanks a lot for the info about the non-gzipped man pages which won't get overwritten when the package falls-in... 
|
|
|
|
11-27-2005, 12:14 AM
|
#4
|
|
Member
Registered: Apr 2004
Location: France
Distribution: Slackware Linux 10.2
Posts: 119
Rep:
|
Quote:
|
jong357: (...) Other than that, you can't avoid spamming the system like that. (...)
|
Sure you can ! Instead of using:
Code:
make install
make DESTDIR=$PKG install
You should use:
Code:
make DESTDIR=$PKG install
(...)
# Build the package here
(...)
installpkg $NAME-$VERSION-$ARCH-$BUILD.tgz
--
LiNuCe
|
|
|
|
11-27-2005, 12:22 AM
|
#5
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
hello linuce,
are you saying that you could just delete the "make install" line?? 
|
|
|
|
11-27-2005, 12:26 AM
|
#6
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Yea, good point. I do that myself on some of my build scripts but it's so much easier to just type 'make install'.... For some reason, when I use installpkg from within a script to satisfy dependencies that are next in line, I feel obligated to do a removepkg on all of them at the end of the script... Don't know why. I'm just wierd like that.  That drags out the script considerably....
|
|
|
|
11-27-2005, 12:40 AM
|
#7
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
okay i think i had misunderstood linuce's post. i'm trying to figure out what you guys mean about using installpkg inside the script. i don't know if it's the sleepyness or maybe i need Ritalin or something but i don't get it yet...  what exactly is going on with the installpkg there?? also, could you please post an actual edited part of the script which i could perhaps use to try to understand this better??  thanks for all your help guys!!
Last edited by win32sux; 11-27-2005 at 12:44 AM.
|
|
|
|
11-27-2005, 12:54 AM
|
#8
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Man, how did the page width on this thread get so long?  I'm going to insert breaks. Sorry
If you take out make install then you'll need to add installpkg. You could do something like this:
Code:
for mandir in `find . -name man -type d` ; do
if [ -d $mandir ]; then
( cd $mandir
find . -type f -name "*.?" -exec gzip -9 {} \;
)
fi
done
)
)
# Install in increments to satisfy deps:
removepkg /tmp/temp-xfce.tgz
makepkg -l y -c n /tmp/temp-xfce.tgz
installpkg /tmp/temp-xfce.tgz
done
Linuce's approach has problems here because you would almost have to re-write the script to incorporate $NAME into the script.
You could use basename as well... But if your going to do that then you might as well just keep them all as individual packages.
There doesn't seem to be an obvious easy way other than what I've listed above. Unless you want to type alot more stuff...
And at the very end of the script you would have to do another "removepkg /tmp/temp-xfce.tgz"
I'm on a Mac right now otherwise I might mess around with it some. I'm sure I might be over looking something but the above
should work out...
|
|
|
|
11-27-2005, 01:13 AM
|
#9
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Ah crap. I put that stuff outside of where it should be. That would make a temp package of $CWD 23 times
Don't think that would satisfy any deps....
Last edited by jong357; 11-27-2005 at 01:39 AM.
|
|
|
|
11-27-2005, 01:20 AM
|
#10
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Code:
#!/bin/sh
# Copyright 2003 Slackware Linux, Inc., Concord, CA, 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.
TMP=/tmp/xfce-build-dir
rm -rf $TMP
mkdir -p $TMP
PKG=$TMP/package-xfce
rm -rf $PKG
mkdir -p $PKG
CWD=`pwd`
VERSION=4.2.2
PKGVER=4.2.2
ARCH=${ARCH:-i486}
BUILD=1
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
for file in \
dbh-1.0.24.tar.bz2 \
libxfce4util-$VERSION.tar.bz2 \
libxfcegui4-$VERSION.tar.bz2 \
libxfce4mcs-$VERSION.tar.bz2 \
xfce-mcs-manager-$VERSION.tar.bz2 \
xfce4-panel-$VERSION.tar.bz2 \
gtk-xfce-engine-2.2.7.tar.bz2 \
xfce-mcs-plugins-$VERSION.tar.bz2 \
xfce-utils-$VERSION.tar.bz2 \
xfce4-appfinder-$VERSION.tar.bz2 \
xfce4-iconbox-$VERSION.tar.bz2 \
xfce4-icon-theme-$VERSION.tar.bz2 \
xfce4-mixer-$VERSION.tar.bz2 \
xfce4-systray-$VERSION.tar.bz2 \
xfce4-session-$VERSION.tar.bz2 \
xfce4-toys-$VERSION.tar.bz2 \
xfce4-trigger-launcher-$VERSION.tar.bz2 \
xfdesktop-$VERSION.tar.bz2 \
xffm-$VERSION.tar.bz2 \
xfprint-$VERSION.tar.bz2 \
xfwm4-$VERSION.tar.bz2 \
xfwm4-themes-$VERSION.tar.bz2 \
xfcalendar-$VERSION.tar.bz2 \
; do
( cd $TMP
tar xjf $CWD/$file
cd `basename $file .tar.bz2`
# Strengthen resistance to /tmp attacks (low risk, but might as well...).
if [ "$file" = "xfce-utils-$VERSION.tar.bz2" ]; then
zcat $CWD/xfce-utils-xinitrc.diff.gz | patch -p1 --verbose
fi
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
# From the COMPOSITOR file in xfwm4:
#
# xfwm4 now features a compositing manager. This code is new and has received only
# a moderate amount of testing, so it's disabled by default.
#
# So, if you want to stay safe, keep the compositor disabled...
#
# If you still want to try the compositor extensions with xfwm4, here follows how
# to enable the compositing manager in xfwm4.
#
# 1) Enabling the compositor manager in xfwm4
# -------------------------------------------
#
# To enable the compositing manager in xfwm4, add --enable-compositor when running
# the configure script.
#
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr \
--sysconfdir=/etc/X11 \
--enable-static=no \
--enable-xinerama
make -j6
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/`basename $file .tar.bz2`
cp -a \
AUTHORS COPYING INSTALL NEWS README TODO \
$PKG/usr/doc/`basename $file .tar.bz2`
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
for mandir in `find . -name man -type d` ; do
if [ -d $mandir ]; then
( cd $mandir
find . -type f -name "*.?" -exec gzip -9 {} \;
)
fi
done
# Install in increments to satisfy deps:
removepkg /tmp/temp-xfce.tgz
makepkg -l y -c n /tmp/temp-xfce.tgz
installpkg /tmp/temp-xfce.tgz
)
)
done
( cd $PKG/usr/bin
ln -sf xffm xffstab4
ln -sf xffm xfapps
ln -sf xffm xfbook
ln -sf xffm xfsamba4
ln -sf xffm xftrash4
ln -sf xffm xfapps4
ln -sf xffm xfbook4
ln -sf xffm xffstab
ln -sf xffm xfglob4
ln -sf xffm xftree4
)
chown -R root.bin $PKG/usr/bin
( mkdir -p $PKG/etc/X11/xinit
cd $PKG/etc/X11/xinit
ln -sf ../xdg/xfce4/xinitrc xinitrc.xfce
chmod 755 ../xdg/xfce4/xinitrc
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# Remove the last temp package:
removepkg /tmp/temp-xfce.tgz
cd $PKG
makepkg -l y -c n $TMP/xfce-$PKGVER-$ARCH-$BUILD.tgz
That should do it... It's 2am here... I'm not entirely alert at the moment... 
|
|
|
|
11-27-2005, 02:21 AM
|
#11
|
|
Member
Registered: Apr 2004
Location: France
Distribution: Slackware Linux 10.2
Posts: 119
Rep:
|
Quote:
|
win32sux: okay i think i had misunderstood linuce's post. i'm trying to figure out what you guys mean about using installpkg inside the script. i don't know if it's the sleepyness or maybe i need Ritalin or something but i don't get it yet... :) what exactly is going on with the installpkg there?? also, could you please post an actual edited part of the script which i could perhaps use to try to understand this better?? :study: thanks for all your help guys!!
|
In fact, you can not just remove the make install line in the SlackBuild for Xfce, unless you use a separate package to install each Xfce software (but you need to modify others lines accordingly) as I always do. Once I have build all Xfce packages, I extract them in a custom Xfce-PkgRoot/ directory which will hold the big Xfce package (I cat each install/doinst.sh in a install/doinst.sh.xfce that I copy at the end to install/doinst.sh before build the big Xfce package).
--
LiNuCe
Last edited by LiNuCe; 11-27-2005 at 02:23 AM.
|
|
|
|
11-27-2005, 05:24 PM
|
#12
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
thanks for the great info, guys! 
|
|
|
|
11-28-2005, 11:29 AM
|
#13
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
One last thing, I was assuming that there were going to be alot of man pages. I just looked at the package and there are only 4 man pages. If I were you, I'd just use the original build script and then just remove the 4 man pages from the system at the end of the script.... ;-)
If there were 100's of man pages like perl has, then you might want to use installpkg in the script, but for xfce, it doesn't really make much sense.
rm -f /usr/man/man1/{fgr,xfce4-session,xfce4-session-logout,xfdesktop}.1
|
|
|
|
11-28-2005, 03:58 PM
|
#14
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
Original Poster
|
yup, that's precisely what i did...
i am however doing it the installpkg way also, for educational purposes...
i guess i should try with perl once i have this method down pat... hehe...
Last edited by win32sux; 11-28-2005 at 04:00 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|