]> repo.cephalix.eu Git - BlueJ.git/commitdiff
Add new file
authorHelmuth Varkoly <helmuth.varkoly@gmail.com>
Wed, 26 Jul 2017 14:56:44 +0000 (16:56 +0200)
committerHelmuth Varkoly <helmuth.varkoly@gmail.com>
Wed, 26 Jul 2017 14:56:44 +0000 (16:56 +0200)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..18d77da
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+PACKAGE         = $(shell basename `pwd` )
+DESTDIR         = /
+REPO            = /srv/www/repo/TESTING/oss-packages/
+VERSION         = $(shell cat VERSION )
+RELEASE         = $(shell cat RELEASE )
+NRELEASE        = $(shell echo $(RELEASE) + 1 | bc )
+
+
+package:
+       cp packages.spec.in oss-pkg-$(PACKAGE).spec
+       sed -i s/VERSION/$(VERSION)/  oss-pkg-$(PACKAGE).spec
+       sed -i s/RELEASE/$(NRELEASE)/ oss-pkg-$(PACKAGE).spec
+       sed -i s/PACKAGE/$(PACKAGE)/  oss-pkg-$(PACKAGE).spec
+       mkdir -p oss-pkg-$(PACKAGE)
+       ln -s ../$(PACKAGE).sls oss-pkg-$(PACKAGE)/$(PACKAGE).sls
+       if [ -d repo-ng ]; then ln -s ../repo-ng/ oss-pkg-$(PACKAGE)/repo-ng; fi
+       tar hjcvpf oss-pkg-$(PACKAGE).tar.bz2 oss-pkg-$(PACKAGE)  
+       rm -rf oss-pkg-$(PACKAGE)
+       mv  oss-pkg-$(PACKAGE).tar.bz2  /usr/src/packages/SOURCES/
+       rpmbuild -bb oss-pkg-$(PACKAGE).spec
+       #I have to learn it
+       #rpm --addsign /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm 
+       mv /usr/src/packages/RPMS/noarch/oss-pkg-$(PACKAGE)-$(VERSION)-$(NRELEASE).noarch.rpm $(REPO)/noarch
+       createrepo $(REPO)
+       #I have to learn it
+       #gpg -a --detach-sign $(REPO)/repodata/repomd.xml
+       echo $(NRELEASE) > RELEASE
+       git commit -a -m "New release"
+       git push
+