# vim: set syn=sh:
# Packager: Phill Watkins <ubemail~at~ymail~dot~com>

pkgname=httpfs2
pkgver=0.1.4
pkgrel=1pw
#arch=noarch
source=\
(
"http://downloads.sourceforge.net/project/httpfs/httpfs2/httpfs2-$pkgver.tar.gz"
"http://downloads.sourceforge.net/project/httpfs/httpfs2/httpfs2.txt"
)
sourcetemplate=http://people.salixos.org/pwatk/packages/13.2/n/$pkgname
#docs=()
url=http://sourceforge.net/projects/httpfs/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"httpfs2 (FUSE filesystem for mounting files from http servers)"
"httpfs2 is a FUSE based filesystem for mounting http or https URLS as"
"files in the filesystem. There is no notion of listable directories in"
"http so only a single URL can be mounted. The server must be able to"
"send byte ranges."
)


build() {
	set -e
	
	cd $startdir/src/$pkgname-$pkgver
	sed "/^CFLAGS/s|-O. |$CFLAGS |" -i Makefile
	#sed "/^binaries/s|#||" -i Makefile
	make -j $numjobs
	install -d $startdir/pkg/usr/bin
	install -m 0755 httpfs2 $startdir/pkg/usr/bin
	#install -m 0755 httpfs2_ssl $startdir/pkg/usr/bin
	install -Dm 0644 httpfs2.1 $startdir/pkg/usr/man/man1/httpfs2.1
	#( cd $startdir/pkg/usr/man/man1 ; ln -sf httpfs2{,_ssl}.1 )
	install -Dm 644 $startdir/src/httpfs2.txt $startdir/pkg/usr/doc/$pkgname-$pkgver/httpfs2.txt

	set +e
}