Эх сурвалжийг харах

use git/xz to make archive

Daisuke SUZUKI 2 жил өмнө
parent
commit
b13808d141
1 өөрчлөгдсөн 11 нэмэгдсэн , 2 устгасан
  1. 11 2
      Makefile

+ 11 - 2
Makefile

@@ -74,10 +74,19 @@ tarbz2: clean
 	fi
 	rm -rf ${NAME}-${VERSION}
 
-rpm: tarbz2
+tarxz: clean
+	git archive HEAD --prefix=${NAME}-${VERSION}/ --output=../${NAME}-${VERSION}.tar.xz
+	@if [ -d ~/rpm/SOURCES/${NAME} ]; then \
+		mv ../${NAME}-${VERSION}.tar.xz ~/rpm/SOURCES/${NAME}; \
+	else \
+		mv ../${NAME}-${VERSION}.tar.xz ~/rpm/SOURCES/; \
+	fi
+	rm -rf ${NAME}-${VERSION}
+
+rpm: tarxz
 	rpmbuild -ba ${NAME}-vl.spec
 
-srpm: tarbz2
+srpm: tarxz
 	rpmbuild -bs ${NAME}-vl.spec
 
 clean: