
#include "../../cf/ImlibPre.tmpl"

IMLPKGDIR=Imlib

#ifdef SunArchitecture

solaris_pkg:
	@echo "Creating Solaris package..."
	@rm -rf ./$(IMLPKGDIR) ./$(IMLPKGDIR)_`uname -p`.pkg
	@sed -e "s#@VERSION@#$(IMLLIBREV)#g" \
		-e "s#@PSTAMP@#$(LOGNAME)_`date | tr ' ' '_'`#g" \
		-e "s#@ARCH@#Solaris_`uname -rp | tr ' ' ','`#g" \
		./Solaris/pkginfo.in > ./Solaris/pkginfo
	@sed -e "s#@VERSION@#$(IMLLIBREV)#g" \
		./Solaris/prototype.in > ./Solaris/prototype
	@sed -e "s#@VERSION@#$(IMLLIBREV)#g" \
		./Solaris/postinstall.in > ./Solaris/postinstall
	pkgmk -d . -b . -r .. -f ./Solaris/prototype $(IMLPKGDIR)
	pkgtrans  -o -s . $(IMLPKGDIR)-$(IMLLIBREV)_SunOS`uname -r`_`uname -p`.pkg $(IMLPKGDIR)

clean::
        $(RM) ./Solaris/prototype ./Solaris/postinstall
	$(RM) ./Solaris/preinstall ./Solaris/pkginfo

distclean::
	$(RM) *.pkg

#endif

clean::
	$(RM) -rf $(IMLPKGDIR)


#include "../../cf/ImlibPost.tmpl"
