### this file is sourced not run
PKGVER=540.1debian5
PKGBUILD=1
PKGARCH=x86_64

# source: james+debian
TARBALL=hfsprogs_540.1.linux3.orig.tar.gz
MD5SUM=0435afc389b919027b69616ad1b05709
SRC_URL=http://deb.debian.org/debian/pool/non-free/h/hfsprogs/$TARBALL
BUNDLE=

SLACKREQ='' # 
SLACKDESC="hfsprogs: hfsprogs $PKGVER (HFS+ filesystem utilities)  
hfsprogs:  
hfsprogs: The HFS+ file system used by Apple Computer for their Mac OS is 
hfsprogs: supported by the Linux kernel. Apple provides mkfs and fsck for HFS+ 
hfsprogs: with the Unix core of their operating system, Darwin.  
hfsprogs: 
hfsprogs: 
hfsprogs: 
hfsprogs: 
hfsprogs: 
hfsprogs:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/diskdev_cmd* &&
	tar -xf ../pkg/hfsprogs_540.1.linux3-5.debian.tar.xz &&
	for p in $(cat debian/patches/series); do
		patch -Np1 -i debian/patches/$p
	done
}

### default pkg_package
### build
pkg_build() {
	cd /tmp/diskdev_cmd*
	
	# build (from debian rules)
	LDFLAGS="-Wl,--as-needed" &&
	make LDFLAGS="$LDFLAGS" &&
	
	# install (from debian rules)
	mkdir -p /usr/share/misc &&

	install -m644 debian/hfsbootdata.img      /usr/share/misc/hfsbootdata &&
	install -m755 fsck_hfs.tproj/fsck_hfs     /sbin/fsck.hfsplus &&
	install -m755 newfs_hfs.tproj/newfs_hfs   /sbin/mkfs.hfsplus &&
	install -m644 fsck_hfs.tproj/fsck_hfs.8   /usr/share/man/man8/fsck.hfsplus.8 &&
	install -m644 newfs_hfs.tproj/newfs_hfs.8 /usr/share/man/man8/mkfs.hfsplus.8 &&

	ln -s fsck.hfsplus		/sbin/fsck.hfs &&
	ln -s mkfs.hfsplus		/sbin/mkfs.hfs &&
	ln -s fsck.hfsplus.8	/usr/share/man/man8/fsck.hfs.8 &&
	ln -s mkfs.hfsplus.8	/usr/share/man/man8/mkfs.hfs.8 &&

	pkg_build_slackdesc
}


