PACKAGE = $(shell basename `pwd` )
DESTDIR = /
-REPO = /srv/www/repo/TESTING/salt-packages/
+REPO = /srv/www/repo/salt-packages/
VERSION = $(shell cat VERSION )
RELEASE = $(shell cat RELEASE )
NRELEASE = $(shell echo $(RELEASE) + 1 | bc )
sed -i s/PACKAGE/$(PACKAGE)/g oss-pkg-$(PACKAGE).spec
sed -i s/YEAR/$(YEAR)/g oss-pkg-$(PACKAGE).spec
../oss-pkg-tools/create_hash.sh $(PACKAGE)
+ rm -rf oss-pkg-$(PACKAGE)
+ rm -rf repo-ng/repo-ng
mkdir -p oss-pkg-$(PACKAGE)
sed s/PACKAGE/$(PACKAGE)/g $(PACKAGE).sls > oss-pkg-$(PACKAGE)/$(PACKAGE).sls
if [ -d repo-ng ]; then ln -s ../repo-ng/ oss-pkg-$(PACKAGE)/repo-ng; fi
rm -rf oss-pkg-$(PACKAGE)
mv oss-pkg-$(PACKAGE).tar.bz2 /usr/src/packages/SOURCES/
rpmbuild -bb oss-pkg-$(PACKAGE).spec
- for i in $(REPO)/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-*.rpm; do test -e $$i && rm $$i; done
+ find $(REPO)/noarch -name "oss-pkg-$(PACKAGE)-$(VERSION)-*.rpm" -exec rm {} \;
mv /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm $(REPO)/noarch
echo $(NRELEASE) > RELEASE
git commit -a -m "New release"
git push
createrepo $(REPO)
+