Linux HOWTOs

About | Home | Search


ERROR: Slooooow dooooown... this page load was delayed.

HOWTO: checkinstall
Description: Keeps track of files modified by 'make install' to create a package
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# CheckInstall 1.6.0
# ==================
# If you're installing CheckInstall so you can use it and Installwatch
# (which is bundled with CheckInstall) to create Slackware packages, you may
# just want to install it from a Slackware package.  [A package will be
# created for it below too.]  To do this, download this package from the
# author:
# checkinstall-1.6.0-i386-1.tgz
# or pick a package from the author of Slackware for the version that you
# have installed:
# checkinstall-1.5.3-i486-2.tgz (slackware-current)
# checkinstall-1.5.3-i486-2.tgz (10.2)
# checkinstall-1.5.3-i486-2.tgz (10.1)
# checkinstall-1.5.3-i486-2.tgz (10.0)
# checkinstall-1.5.3-i386-1.tgz (9.1)
# checkinstall-1.5.3-i386-1.tgz (9.0)
# and run:
# su -c "installpkg ./checkinstall-*.tgz"
#
# ...otherwise, continue below to install it from source, and then to
# create and install a Slackware package for checkinstall created by itself
# :-)

cd
test -f installed/checkinstall-1.6.0.tgz &&
 mv installed/checkinstall-1.6.0.tgz .
test ! -f checkinstall-1.6.0.tgz &&
 wget http://asic-linux.com.mx/~izto/checkinstall/files/source/\
checkinstall-1.6.0.tgz

# Verify tarball w/ md5sum:
# (this is from Jason, not the author, I couldn't find one)
echo "41c1be61199406edf2e3ee92f2007fe5  checkinstall-1.6.0.tgz" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "checkinstall-*" -exec rm -r {} \;
tar xzvf ~/checkinstall-1.6.0.tgz
cd checkinstall-1.6.0
test $UID = 0 && chown -R root:root .

# Apply this patch to change installation paths to match Slackware's paths
# and to set some checkinstallrc options.
wget -nc http://englanders.cc/pub/linux/patches/checkinstall-1.6.0.patch &&
 patch -p1 < checkinstall-1.6.0.patch

# Compile it
make

# Become root to install it
su

# Backup your existing checkinstallrc file, if you have one:
test -f /etc/checkinstall/checkinstallrc &&
 ( mkdir -p -m 0700 ~/backup
   cp -a /etc/checkinstall/checkinstallrc ~/backup/ )
test -f /usr/local/lib/checkinstall/checkinstallrc &&
 ( mkdir -p -m 0700 ~/backup
   cp -a /usr/local/lib/checkinstall/checkinstallrc ~/backup/ )

# Remove the old package
test -x /sbin/removepkg && /sbin/removepkg checkinstall

# Install it
make install

# Now that it's installed (now that you can use it to do so), run
# checkinstall to create and install a package for itself:
checkinstall --arch=`arch` --pkgrelease=1jme

# Now install the package
installpkg ./checkinstall-1.6.0-i686-1jme.tgz

# Clean up the files created by running checkinstall.  If you want to keep
# the package, move it elsewhere first.
rm -f ./backup-*-pre-checkinstall-1.6.0.tgz ./checkinstall-1.6.0-*.tgz \
 ./description-pak ./install-pak
test -d ./doc-pak && rm -r ./doc-pak

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/checkinstall-*.tgz
mv checkinstall-1.6.0.tgz installed/

# To use it to create a package, extract the tarball, create a file named
# 'description-pak', create a directory named doc-pak with the files you
# want installed as documentation (README, FAQ, INSTALL, etc.) in it, then
# run 'checkinstall'.
#
# To keep temp files (in /var/tmp and a tarball named pkg-debug.*.tgz) pass
# -d1 to it so you can see files like the slackbuild
#
# For more info read the docs in /usr/doc/checkinstall-1.6.0 and
# read 'checkinstall --help 2>&1 | less'

# If you ever need to uninstall CheckInstall:
su -c "removepkg checkinstall"
find ~/src -maxdepth 1 -type d -name "checkinstall-*" -exec rm -r {} \;
rm ~/installed/checkinstall-*.tgz

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>