Quote:
Originally Posted by kaon
3) configure with options (what options other than --prefix=/usr?)
|
I use my own build scripts for individual packages just cause it's easier for me to keep my "stuff" seperated. Having said that I always add --sysconfdir=/etc --localstatedir=/var/lib along with --prefix=/usr.
Quote:
Originally Posted by kaon
5) make install (?!)
|
Be sure and use the make install DESTDIR=/
directory directive so that the souce isn't actually "installed" on your system, but rather "installed" to a directory of your choice for package building. For example I use /work/builds.
Quote:
Originally Posted by kaon
6) change permission to 755/644/600 (another uncertainy)
|
After I run make in my script I added the following to make sure my permissions are set correctly:
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
This is run from the just compiled source directory, VERY IMPORTANT!
Then after make install DESTDIR=/
directoryname, I cd over to the install directory and exectue the following to make sure any bin files have the proper ownership:
chown root.bin ${BUILD}usr/bin/*
chown root.bin ${BUILD}usr/sbin/*
chown root.bin ${BUILD}bin/*
chown root.bin ${BUILD}sbin/*
chown root.bin ${BUILD}usr/X11R6/bin/*
I also strip the binaries and zip the manpages:
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
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
bzip2 -9q ${BUILD}usr/man/*/*
bzip2 -9q ${BUILD}usr/info/*
Quote:
Originally Posted by kaon
7) makepkg
|
makepkg -l y -p -c n ${FILE}-${VER}-${ARCH}-${REV}.tgz
md5sum ${FILE}-${VER}-${ARCH}-${REV}.tgz > ${FILE}-${VER}-${ARCH}-${REV}.tgz.md5
All variables, ${BUILD}, ${FILE}, etc, are assigned by the script.
HTH, MMYoung