blob: a13eab8c4ee9f1bf51886e82f1a5aa31eaf8c5d2 (
plain)
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
61
62
63
64
65
66
67
68
69
70
|
#---------------------------------------------------------------
# Project : Mandriva Linux
# Module : spec-helper
# File : Makefile
# Version : $Revision$
# Author : $Author$
# Created On : $Date$
#---------------------------------------------------------------
PACKAGE=spec-helper
VERSION:=$(shell rpm --qf %{VERSION} -q --specfile spec-helper.spec)
FILES=spec-helper clean_files clean_perl compress_files strip_files lib_symlinks gprintify.py fix-mo translate_menu.pl \
fixpamd gprintify remove_info_dir relink_symlinks
MACROSFILE = $(PACKAGE).macros
DISTFILES= AUTHORS Makefile ChangeLog Howto-spec-helper $(FILES) macroszification spec-helper.spec $(MACROSFILE).in
bindir=/usr/bin
spec_helper_dir=/usr/share/spec-helper
rpmmacrosdir=/etc/rpm
all:
@echo "use make install or make dist"
install: $(MACROSFILE)
install -d -m755 $(DESTDIR)$(bindir)
install -m755 macroszification $(DESTDIR)$(bindir)/
install -d -m 755 $(DESTDIR)$(spec_helper_dir)
install -m 755 $(FILES) $(DESTDIR)$(spec_helper_dir)
install -d -m 755 $(DESTDIR)/$(rpmmacrosdir)
install -m 644 $(MACROSFILE) $(DESTDIR)/$(rpmmacrosdir)
clean:
find . -name '*~' | xargs rm -f
# rules to build a test rpm
localrpm: localdist buildrpm
localdist: cleandist dir localcopy tar
cleandist: clean
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
dir:
mkdir $(PACKAGE)-$(VERSION)
localcopy:
ln $(DISTFILES) $(PACKAGE)-$(VERSION)
tar:
tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
rm -rf $(PACKAGE)-$(VERSION)
spec-helper.macros: spec-helper.macros.in
cat $< | sed -e 's:@SPEC_HELPER_ROOT@:$(spec_helper_dir):' > $@
buildrpm:
rpm -ta $(PACKAGE)-$(VERSION).tar.bz2
# rules to build a distributable rpm
rpm: changelog dist buildrpm
dist: cleandist dir tar
changelog: ../common/username.xml
svn2cl --accum --strip-prefix=soft/rpm/spec-helper/trunk --authors ../common/username.xml
rm -f ChangeLog.bak
|