Package-Name: sash
Gentoo-Package: app-shells/sash
Compile-Requires: gcc binutils make glibc
Homepage: http://www.canb.auug.org.au/~dbell/
Source: http://www.canb.auug.org.au/~dbell//(programs\x2Fsash-\d+\.\d+(\.\d+)?\.tar\.gz)/[\0-\377]*?programs\x2Fsash-(\d+.\d+(.\d+)?).tar.gz $1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	mv -f CHANGES README "$(PREFIX)/"
	umask 022 ; mkdir -p "$(PREFIX)"/{sbin,man/man1}
# The CC setting below is to fix a problem with some kernels (e.g. 2.4.3)
# that try to include <linux/string.h> and cause massive problems.  Also
# note that optimization is disabled to avoid potential compiler bugs.
	$(MAKE) install CC="gcc -D_LINUX_STRING_H_" OPT=-O0 MOUNT_TYPE='\"ext2\"' BINDIR="$(PREFIX)"/sbin MANDIR="$(PREFIX)"/man/man1
Install:
# Use chattr to make sure /sbin/sash doesn't get accidentally deleted
	-chattr -i /sbin/sash
	mv -f "$(PREFIX)"/sbin/sash /sbin/
	chmod 500 /sbin/sash
	chattr +i /sbin/sash
	$(MAKE) instman SECTION=1 MAN=sash
Patch: <<EOT
######## begin local optimization flags patch
--- Makefile.old	2002-07-22 08:24:47 +0900
+++ Makefile	2005-07-20 03:32:39 +0900
@@ -14,7 +14,8 @@
 MOUNT_TYPE		= '"ext3"'
 
 
-CFLAGS = -O3 -Wall -Wmissing-prototypes \
+OPT = -O3
+CFLAGS = $(OPT) -Wall -Wmissing-prototypes \
 	-DHAVE_GZIP=$(HAVE_GZIP) \
 	-DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
 	-DHAVE_LINUX_MOUNT=$(HAVE_LINUX_MOUNT) \
######## end local optimization falgs patch
EOT

/pkg/sash/
/sbin/sash
/usr/man/man1/sash.1.gz
