SlackwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
to build from either unpacked tarball or CVS source:
autoheader
autoconf
./configure # (--help to see options)
make # (the make from GNU, sometimes called gmake)
su # Possibly required
make -n install # (to see where all the files will go)
make -s install # (to really install, -s to silence output)
Code:
root@ironnet:/tmp# src2pkg -C -I privoxy-3.0.16-stable-src.tar.gz
Found source archive: privoxy-3.0.16-stable-src.tar.gz
Creating working directories:
PKG_DIR=/tmp/privoxy-3.0.16-i486-1
SRC_DIR=/tmp/privoxy-3.0.16-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Notice - These sources use GNUmakefiles, instead of Makefiles.
We rename the Makefile to Makefile.found and start fresh.
If not, the Makefile would be used instead of the new GNUmakefile.
Found incomplete autoconf sources - Regenerating config files -
Skipping configure_source -
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
I think that trouble is in autoheader. I don't now does src2pkg (2.1) support it.
Is it impossible to build a package of privoxy with src2pkg?
#!/bin/bash
## src2pkg script for: privoxy
## Auto-generated by src2pkg-2.2
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>
SOURCE_NAME='privoxy-3.0.16-stable-src.tar.gz'
NAME='privoxy' # Use ALT_NAME to override guessed value
VERSION='3.0.16' # Use ALT_VERSION to override guessed value
# ARCH=''
# BUILD='1'
# PRE_FIX='usr'
# from the privoxy.SlackBuild:
PRIVOXY_USER=${PRIVOXY_USER:-privoxy}
PRIVOXY_GROUP=${PRIVOXY_GROUP:-privoxy}
if ! grep -q ^$PRIVOXY_GROUP: /etc/group 2>/dev/null ; then
echo " Error: PRIVOXY group ($PRIVOXY_GROUP) doesn't exist."
echo " Try creating one with: groupadd -g 206 $PRIVOXY_GROUP"
exit 1
fi
if ! grep -q ^$PRIVOXY_USER: /etc/passwd 2>/dev/null ; then
echo " Error: PRIVOXY user ($PRIVOXY_USER) doesn't exist."
echo " Try creating one with: useradd -u 206 -g $PRIVOXY_GROUP -d /dev/null -s /bin/false $PRIVOXY_USER"
exit 1
fi
# Any extra options go here:
EXTRA_CONFIGS="--sysconfdir=/etc/$NAME \
--localstatedir=/var \
--docdir=$docdir/$NAME-$VERSION \
--with-docbook=no \
--with-user=$PRIVOXY_USER \
--with-group=$PRIVOXY_GROUP"
# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
# build() { CODE }
# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;
# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
#cd $SRC_DIR
#autoheader
#autoconf
configure_source #
compile_source # If used, the 'build' function replaces these 3
fake_install #
mkdir -p $PKG_DIR/etc/$NAME/templates
cp $SRC_DIR/templates/* $PKG_DIR/etc/$NAME/templates
#Adapted from the privoxy.SlackBuild:
rm -rf $PKG_DIR/etc/rc.d
mkdir -p $PKG_DIR/etc/rc.d
cat $SRC_DIR/slackware/rc.privoxy.orig > $PKG/etc/rc.d/rc.$NAME.new
sed -i " s/%PROGRAM%/$NAME/
s,%SBIN_DEST%,/usr/bin,
s,%CONF_DEST%,/etc/$NAME,
s/%USER%/$NAME/
s/%GROUP%/$NAME/
" $PKG_DIR/etc/rc.d/rc.$NAME.new
# Fix Path within the configuration files (thanks to h4kteur)
sed -i "s#$PKG_DIR##g" $PKG_DIR/etc/$NAME/config
# Fix Path with the config file to point to right usermanual (thanks to BP{k})
sed -i \
"s#user-manual /usr/doc/$NAME#user-manual /$docdir/$NAME-$VERSION#" \
$PKG_DIR/etc/privoxy/config
# Make .new files so we dont clobber existing configuration
find $PKG_DIR/etc/privoxy -type f -exec mv {} {}.new \;
# Don't clobber the logfile either
mv $PKG_DIR/var/log/privoxy/logfile $PKG_DIR/var/log/privoxy/logfile.new
# Remove this directory since it's empty and part of Slackware base
rmdir $PKG_DIR/var/run &> /dev/null
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process
Also place this alongside the build script as:
doinst.prepend:
Code:
# Keep same perms on rc.privoxy.new:
if [ -e etc/rc.d/rc.privoxy ]; then
cp -a etc/rc.d/rc.privoxy etc/rc.d/rc.privoxy.new.incoming
cat etc/rc.d/rc.privoxy.new > etc/rc.d/rc.privoxy.new.incoming
mv etc/rc.d/rc.privoxy.new.incoming etc/rc.d/rc.privoxy.new
fi
# If there's no existing log file, move this one over;
# otherwise, kill the new one
if [ ! -e var/log/privoxy/logfile ]; then
mv var/log/privoxy/logfile.new var/log/privoxy/logfile
else
rm -f var/log/privoxy/logfile.new
fi
if ! grep -q ^privoxy: /etc/group 2>/dev/null ; then
echo " Error: PRIVOXY group 'privoxy' doesn't exist."
echo " Creating one with: groupadd -g 206 privoxy"
groupadd -g 206 @PRIVOXY_GROU@
fi
if ! grep -q ^privoxy: /etc/passwd 2>/dev/null ; then
echo " Error: PRIVOXY user 'privoxy' doesn't exist."
echo " Try creating one with: useradd -u 206 -g privoxy -d /dev/null -s /bin/false privoxy"
exit 1
fi
if ! [ -x etc/rc.d/rc.privoxy ]; then
echo " etc/rc.d/rc.privoxy must be set executable to enable privoxy at boot-time:"
echo " chmod 755 /etc/rc.d/rc.privoxy"
fi
Did you create the libsigc++ package using src2pkg, or how?
Yes, I tried to create it with parameters -C -I.
10x for script, I'll try to use it.
But if I'll get the same trouble in future, should I ask you for another script? Are you going to update you program to version 2.2?
I updated the build script to make it more complete and adding a doinst.sh fragment (be súre to name it doinst.prepend)
I'm usually around to help out when you get stuck building something using src2pkg, so don't be afraid to ask for help.
It's worth studying any scripts I provide you with, as well as the included examples, so you can go along learning to fix troublesome builds.
Thanks for reporting that. I'm pretty sure I've found the problem already. A while back I re-wrote some code which preceeds the routine where that error comes from and changed a couple of things which seem to have broken it. Not many people use the '-I' option, so the error didn't show up until you came along...
I'm releasing in a few days so I'll get this fix in there before then. If you want your name in the src2pkg ChangeLog, email me with your real name at:
amigo AT ibiblio DOT org
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.