-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 960 Bytes
/
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
package=glite-initscript-globus-gridftp
.PHONY: configure install clean rpm dist
all: configure
install:
@echo installing ...
@mkdir -p $(DESTDIR)/etc/init.d/ $(DESTDIR)/etc/logrotate.d/
@install -m 0755 src/globus-gridftp $(DESTDIR)/etc/init.d/
@install -m 0644 src/logrotate/globus-gridftp $(DESTDIR)/etc/logrotate.d/
clean::
rm -f *~ test/*~ etc/*~ doc/*~ src/*~
rm -rf rpmbuild
dist:
echo ${package}-`sed \
-e '/^Version:/!d' \
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e q \
${package}.spec` > .fname
-rm -rf `cat .fname`
mkdir `cat .fname`
cp -lvr src/ Makefile LICENSE `cat .fname`
tar chzf `cat .fname`.tar.gz `cat .fname`
-rm -rf `cat .fname` .fname
rpm:
@mkdir -p RPMS
@mkdir -p rpmbuild/RPMS/noarch
@mkdir -p rpmbuild/SRPMS/
@mkdir -p rpmbuild/SPECS/
@mkdir -p rpmbuild/SOURCES/
@mkdir -p rpmbuild/BUILD/
@tar --gzip --exclude='*CVS*' -cf rpmbuild/SOURCES/${package}.src.tgz *
rpmbuild -ba ${package}.spec