aboutsummaryrefslogtreecommitdiff
blob: 20314bbee22834ccf55a19ebd551b6d90d4ac218 (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
CFLAGS += -Wall

VER ?= 9999
PV = 9.0.0.$(VER)g
P = rpm2targz-$(PV)

DESTDIR =
prefix = /usr
bindir = $(prefix)/bin
dodir = install -m 755 -d
dobin = install -m 755
dosym = ln -sf

all: rpmoffset rpm2tar
rpm2tar: rpm2targz
	$(dosym) $< $@

clean:
	rm -f *.o rpmoffset rpm2tar

dist:
	git archive --prefix=$(P)/ master | lzma > $(P).tar.lzma

dist-live: clean
	rm -rf $(P)
	mkdir $(P)
	cp `find . -maxdepth 1 -type f '!' -name .gitignore` $(P)

install: rpmoffset
	$(dodir) $(DESTDIR)$(bindir)
	$(dobin) rpm2targz rpmoffset $(DESTDIR)$(bindir)
	set -e ; \
	for t in tar tarbz2 tbz2 tarlzma tgz ; do \
		$(dosym) rpm2targz $(DESTDIR)$(bindir)/rpm2$$t ; \
	done

.PHONY: all clean install