Re:Old School Goes New School with Slackware 13.1
by peterwwillis on Tuesday June 01, 2010 @03:46PM
(#1395952)
Just as a reminder, this will create and install your software as owned with your local user/group. This means your /usr/bin/ and other directories will now be writable by your local user and group. You can pass '-c y' to makepkg to make all directories owned by root:root and mode 0755, which may screw with some things that expect group 'bin' or more tight permissions.
I prefer to do 'make install DESTDIR=./PKG/ && rm -rf ./PKG/ && sudo make install DESTDIR=./PKG/ && cd PKG && sudo makepkg -c n -l y ....'. This first tests if the Makefile properly supports DESTDIR (assuming the 'make install' will fail if it tried to install a file to a root-owned directory). If it does, it runs the 'make install' as root with the DESTDIR argument, which will create all the files with the expected owners/perms.
I prefer to do 'make install DESTDIR=./PKG/ && rm -rf ./PKG/ && sudo make install DESTDIR=./PKG/ && cd PKG && sudo makepkg -c n -l y ....'. This first tests if the Makefile properly supports DESTDIR (assuming the 'make install' will fail if it tried to install a file to a root-owned directory). If it does, it runs the 'make install' as root with the DESTDIR argument, which will create all the files with the expected owners/perms.
I put it all in some shell scripts a while back if you're interested: http://psydev.syw4e.info/new/slacktools/