ethereal1m |
04-08-2010 01:09 PM |
Try to remove previous installation and create a package but got an error
Dear all,
I once installed a software using make install and uninstalled it manually (since I'm not familiar with make uninstall). But when I try to create a package using src2pkg from its binary, got an error.
Suppose this is the makefile:
Code:
TGT=noip2
CC=gcc
PKG=noip-2.1.tgz
PREFIX=/usr/local
CONFDIR=${PREFIX}/etc
BINDIR=${PREFIX}/bin
# these defines are for Linux
LIBS=
ARCH=linux
# for Mac OS X and BSD systems that have getifaddr(), uncomment the next line
#ARCH=bsd_with_getifaddrs
# for early BSD systems without getifaddrs(), uncomment the next line
#ARCH=bsd
# for solaris, uncomment the next two lines
# LIBS=-lsocket -lnsl
# ARCH=sun
${TGT}: Makefile ${TGT}.c
${CC} -Wall -g -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS}
install: ${TGT}
if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi
if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR};fi
cp ${TGT} ${BINDIR}/${TGT}
${BINDIR}/${TGT} -C -c /tmp/no-ip2.conf
mv /tmp/no-ip2.conf ${CONFDIR}/no-ip2.conf
package: ${TGT}
rm -f *.bak
mv ${TGT} binaries/${TGT}-`uname -m`
scp a-k:/local/bin/noip2 binaries/noip2-`ssh a-k uname -m`
cd ..; tar zcvf /tmp/${PKG} noip-2.0/*
scp /tmp/${PKG} a-k:/opt/www/${PKG}
rm /tmp/${PKG}
clean:
rm -f *o
rm -f binaries/*
rm -f ${TGT}
And to uninstall, I deleted /usr/local/etc/noip.conf and /usr/loca/bin/noip
Then I did src2pkg:
Code:
root@firefly:/home/ethereal1m/src# src2pkg -VV -W noip-duc-linux.tar.gz
Found global src2pkg.conf - Reading /etc/src2pkg/src2pkg.conf
Found source archive: noip-duc-linux.tar.gz
Creating working directories:
PKG_DIR=/tmp/noip-duc-linux-x86_64-1
SRC_DIR=/tmp/noip-duc-linux-src-1
Unpacking source archive -
./._noip-2.1.9-1
noip-2.1.9-1/
noip-2.1.9-1/._binaries
noip-2.1.9-1/binaries/
noip-2.1.9-1/binaries/._noip2-i686
noip-2.1.9-1/binaries/noip2-i686
noip-2.1.9-1/binaries/._noip2-x86_64
noip-2.1.9-1/binaries/noip2-x86_64
noip-2.1.9-1/._COPYING
noip-2.1.9-1/COPYING
noip-2.1.9-1/._debian.noip2.sh
noip-2.1.9-1/debian.noip2.sh
noip-2.1.9-1/._gentoo.noip2.sh
noip-2.1.9-1/gentoo.noip2.sh
noip-2.1.9-1/._LEEME.PRIMERO
noip-2.1.9-1/LEEME.PRIMERO
noip-2.1.9-1/._LIESMICH.ERST.deutsch
noip-2.1.9-1/LIESMICH.ERST.deutsch
noip-2.1.9-1/._LISEZMOI.ENPREMIER
noip-2.1.9-1/LISEZMOI.ENPREMIER
noip-2.1.9-1/._mac.osx.startup
noip-2.1.9-1/mac.osx.startup
noip-2.1.9-1/._Makefile
noip-2.1.9-1/Makefile
noip-2.1.9-1/._noip2.c
noip-2.1.9-1/noip2.c
noip-2.1.9-1/._README.FIRST
noip-2.1.9-1/README.FIRST
noip-2.1.9-1/._README.FIRST-SWE
noip-2.1.9-1/README.FIRST-SWE
noip-2.1.9-1/._README.FIRST.FRANCAIS
noip-2.1.9-1/README.FIRST.FRANCAIS
noip-2.1.9-1/._README.FIRST.ITALIANO
noip-2.1.9-1/README.FIRST.ITALIANO
noip-2.1.9-1/._README.FIRST.JAPANESE
noip-2.1.9-1/README.FIRST.JAPANESE
noip-2.1.9-1/._README.FIRST.pt_BR
noip-2.1.9-1/README.FIRST.pt_BR
noip-2.1.9-1/._README.FIRST_PT
noip-2.1.9-1/README.FIRST_PT
noip-2.1.9-1/._redhat.noip.sh
noip-2.1.9-1/redhat.noip.sh
Correcting source permissions - Done
Checking for patches - None found
Skipping configuration: Nothing to be done
Continuing - We found at least one Makefile
Compiling sources - Using: 'make'
Compiler Messages:
gcc -Wall -g -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2
Compiling has been - Successful!
Checking for Makefile rule: 'install' Okay
Creating content in JAIL root - Using: 'make install'
if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi
if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi
cp noip2 /usr/local/bin/noip2
/usr/local/bin/noip2 -C -c /tmp/no-ip2.conf
make: /usr/local/bin/noip2: Command not found
make: *** [install] Error 127
Safe content creation - Successful!
Processing package content:
Correcting package permissions - Done
Stripping ELF binaries - Using: strip -p --strip-unneeded Done
Checking for standard documents - Done
Creating slack-desc - From default text
Searching for links in: noip-duc-linux-x86_64-1 - None found
Rechecking package correctness -
Checking for misplaced dirs -
Notice - Package contains /usr/local directory, but PRE_FIX is: /usr
You may need to patch the Makefile(s) to correct the installation prefix.
FATAL! This build installs faulty directories or files.
You must fix the build as suggested above, or override this action with:
FAIL_ON_BAD_DIRS=NO from the command-line or in your src2pkg.conf file.
I don't understand why I got the following errors:
Code:
make: /usr/local/bin/noip2: Command not found
make: *** [install] Error 127
And also I don't understand why it is complaining that PRE_FIX is /usr whereas according to MAKEFILE PRE_FIX is /usr/local. Where did it get a change?
Regards,
ethereal1m
|