### this file is sourced not run
PKGVER=710.0
PKGBUILD=2
PKGARCH=noarch

### build a package out of ready-made directory
TARBALL=fatdog-scripts-$PKGVER-noarch-1.txz
MD5SUM=  # none
SRC_URL= # none
BUNDLE=  # none

SLACKREQ=  # none
SLACKDESC="fatdog-update: fatdog-update $PKGVER ($PKGBUILD) (Fatdog base scripts update)
fatdog-update: 
fatdog-update: This package contains the latest fixes and updates to Fatdog base 
fatdog-update: scripts for the Fatdog version noted on the name of this package. 
fatdog-update: This package is updated often, and you can re-install it from time to 
fatdog-update: time to get the latest fixes as needed.
fatdog-update:
fatdog-update: Important Note: Once installed, this package CANNOT BE UNINSTALLED - 
fatdog-update: attempt of doing so will render your Fatdog completely unusable.
fatdog-update: 
fatdog-update: 
"
# don't build, don't create package - we do it ourselves here
PKG_NOBUILD=yes
PKG_NOMAKEPKG=yes


###
pkg_download() {
	: nothing to download
}

###
pkg_prepare() {
	tar -C tmp/pkg -xf $OUTPUT_DIR/$TARBALL
}

### package ready-made directory
pkg_package() {
	(
		cd tmp/pkg &&
		rm -r archive home install mnt opt root run tmp var &&
		cd usr &&
		rm -r doc local/lib man info &&
		cd share &&
		rm -r backgrounds consolefonts desktop-directories fonts gimp \
		      man midi-icons mini-icons pixmaps/midi-icons pixmaps/mini-icons \
		      pixmaps/audio* pixmaps/email* pixmaps/tsclient* &&
		cd ../.. &&
		cd etc &&
		rm -r bash_completion.d crontabs cups dbus-1 ld.so.conf.d \
		      rc.d/rc.local rc.d/rc.network slapt-get \
		      X11 xdg/menus xdg/rox.sourceforge.net xdg/templates \
		      defaultprograms eventmanager fatdog-dialer.conf \
		      fstab group gshadow gtksudoer hostname hosts inittab \
		      inputrc issue ld.so.conf modules mongoose* passwd \
		      printcap shadow shinit slim.conf wpagui \
		      wpa_supplicant.conf &&
		cd xdg/Startup &&
		rm nvidia-workaround.sh 
	) &&
	pkg_package_dir
}

### build
pkg_build() {
	: nothing to build
}
