Home | History | Annotate | Download | only in zfs-snapshot
      1  25  tim DIR = \
      2  25  tim 	`basename ${PWD}`
      3  28  tim ZFS_AUTO_SNAPSHOT_CHANGESET = \
      4  28  tim 	`hg identify`
      5  25  tim 
      6   5  tim pkg: clean
      7   5  tim 	mkdir -p proto
      8  28  tim 	find src | cpio -pvdum proto
      9  30  tim 	# we tag the method script during the build, which will
     10  30  tim 	# only happen if we're building from the original hg source,
     11  30  tim 	# not from the dist tarball - see the dist: target.
     12  28  tim 	cat src/lib/svc/method/zfs-auto-snapshot | sed -e "s/~ZFS_AUTO_SNAPSHOT_CHANGESET~/${ZFS_AUTO_SNAPSHOT_CHANGESET}/g" > proto/src/lib/svc/method/zfs-auto-snapshot
     13  28  tim 	pkgmk -f proto/src/prototype -p `uname -n``date +%Y%m%d%H%M%S` -d proto -r proto/src
     14   5  tim 
     15   5  tim clean:
     16   5  tim 	rm -rf proto/*
     17  25  tim 	if [ -d proto ] ; then \
     18  25  tim 		rmdir proto ; \
     19  25  tim 	fi
     20  25  tim 
     21  28  tim dist: clean
     22  30  tim 	# save off a copy of the method script before tagging it
     23  30  tim 	cp src/lib/svc/method/zfs-auto-snapshot zfs-auto-snapshot.src
     24  30  tim 
     25  30  tim 	cat src/lib/svc/method/zfs-auto-snapshot | sed -e "s/~ZFS_AUTO_SNAPSHOT_CHANGESET~/${ZFS_AUTO_SNAPSHOT_CHANGESET}/g" > src/lib/svc/method/tagged-method-script
     26  30  tim 	mv src/lib/svc/method/tagged-method-script src/lib/svc/method/zfs-auto-snapshot
     27  30  tim 	grep "zfs-auto-snapshot changeset" src/lib/svc/method/zfs-auto-snapshot
     28  25  tim 	tar cf ${DIR}.tar -C .. ${DIR}/Changelog -C .. ${DIR}/Makefile \
     29  25  tim 	-C .. ${DIR}/README.zfs-auto-snapshot.txt -C .. ${DIR}/src
     30  25  tim 	gzip ${DIR}.tar
     31  30  tim 	
     32  30  tim 	# drop our saved method script back where we left it
     33  30  tim 	cp zfs-auto-snapshot.src src/lib/svc/method/zfs-auto-snapshot
     34