-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (50 loc) · 2.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#*******************************************************************************
# Copyright (C) 2015, CERN
# # This software is distributed under the terms of the GNU General Public
# # License version 3 (GPL Version 3), copied verbatim in the file "LICENSE".
# # In applying this license, CERN does not waive the privileges and immunities
# # granted to it by virtue of its status as Intergovernmental Organization
# # or submit itself to any jurisdiction.
# #
# #
# #*******************************************************************************
SPECFILE=python-netapp-api.spec
REPOURL=git+https://github.com
# DB gitlab group
REPOPREFIX=/cerndb
REPO_NAME=netapp-api-python
# Get all the package infos from the spec file
PKGVERSION=$(shell awk '/Version:/ { print $$2 }' ${SPECFILE})
PKGRELEASE=$(shell awk '/Release:/ { print $$2 }' ${SPECFILE} | sed -e 's/\%{?dist}//')
PKGNAME=$(shell awk '/Name:/ { print $$2 }' ${SPECFILE})
PKGID=$(PKGNAME)-$(PKGVERSION)
TARFILE=$(PKGID).tar.gz
sources:
#tar cvzf $(TARFILE) --exclude-vcs --transform 's,^,$(PKGID)/,' *
rm -rf /tmp/$(PKGID)
mkdir /tmp/$(PKGID)
cp -rv * /tmp/$(PKGID)/ > /dev/null 2>&1
pwd ; ls -l
cd /tmp ; tar --exclude .svn --exclude .git --exclude .gitkeep -czf $(TARFILE) $(PKGID)
mv /tmp/$(TARFILE) .
rm -rf /tmp/$(PKGID)
all: sources
clean:
find . -name \*.pyc -o -name \*.pyo -o -name __pycache__ -exec rm -rf {} +
rm -f $(TARFILE)
srpm: all
rpmbuild -bs --define '_sourcedir $(PWD)' ${SPECFILE}
rpm: all
rpmbuild -ba --define '_sourcedir $(PWD)' ${SPECFILE}
scratch:
koji build db6 --nowait --scratch ${REPOURL}${REPOPREFIX}/${REPO_NAME}.git#master
koji build db7 --nowait --scratch ${REPOURL}${REPOPREFIX}/${REPO_NAME}.git#master
build:
koji build db6 --nowait ${REPOURL}${REPOPREFIX}/${REPO_NAME}.git#master
koji build db7 --nowait ${REPOURL}${REPOPREFIX}/${REPO_NAME}.git#master
tag-qa:
koji tag-build db6-qa $(PKGID)-$(PKGRELEASE).el6
koji tag-build db7-qa $(PKGID)-$(PKGRELEASE).el7.cern
tag-stable:
koji tag-build db6-stable $(PKGID)-$(PKGRELEASE).el6
koji tag-build db7-stable $(PKGID)-$(PKGRELEASE).el7.cern