-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 1020 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 1020 Bytes
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
SPECFILE = $(shell find -maxdepth 1 -type f -name *.spec)
SPECFILE_NAME = $(shell awk '$$1 == "Name:" { print $$2 }' $(SPECFILE) )
SPECFILE_VERSION = $(shell awk '$$1 == "Version:" { print $$2 }' $(SPECFILE) )
DIST ?= $(shell rpm --eval %{dist})
FILES=LICENSE README.md setup.py setup.cfg MANIFEST.in
PKGNAME=scitags
sources:
mkdir dist
cp ${SPECFILE} dist/
mkdir -p dist/${PKGNAME}-${SPECFILE_VERSION}
cp -pr ${FILES} sbin etc scitags dist/${PKGNAME}-${SPECFILE_VERSION}/.
find dist -type d -name .svn | xargs -i rm -rf {}
find dist -type d -name .git | xargs -i rm -rf {}
cd dist ; tar cfz ../${PKGNAME}-${SPECFILE_VERSION}.tar.gz ${PKGNAME}-${SPECFILE_VERSION}
rm -rf dist
srpm: sources
rpmbuild -bs --define "dist $(DIST)" --define "_topdir $(PWD)/build" --define '_sourcedir $(PWD)/dist' $(SPECFILE)
rpm: sources
rpmbuild -bb --define "dist $(DIST)" --define "_topdir $(PWD)/build" --define '_sourcedir $(PWD)/dist' $(SPECFILE)
clean:
rm -rf build/ *.tgz