aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 81411c97331932baae5fce69da1f1af06664c19c (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

NAME=iurt
PACKAGE=$(NAME)
VERSION=0.6.7

VENDORLIB = $(shell eval "`perl -V:installvendorlib`"; echo $$installvendorlib)
INSTALLVENDORLIB = $(DESTDIR)$(VENDORLIB)

SVNSOFT=svn+ssh://svn.mageia.org/svn/soft/build_system/iurt/trunk/
SVNPACKAGE=svn+ssh://svn.mageia.org/svn/packages/cauldron/iurt/current/

sharedir=/usr/share
libdir=/usr/lib
bindir=/usr/bin
sbindir=/usr/sbin

install:
	install -d $(bindir) $(sbindir) $(INSTALLVENDORLIB)/Iurt
	install -m 644 lib/Iurt/*.pm $(INSTALLVENDORLIB)/Iurt
	install -m755 iurt_root_command $(sbindir)/
	install -m755 iurt2 $(bindir)/iurt
	install -m755 emi ulri $(bindir)/

tar: dist

dist:
	rm -rf ../$(NAME)-$(VERSION).tar*
	@if svn info > /dev/null; then \
		$(MAKE) dist-svn; \
	elif [ -e ".git" ]; then \
		$(MAKE) dist-git; \
	else \
		echo "Unknown SCM (not SVN nor GIT)";\
		exit 1; \
	fi;
	$(info $(NAME)-$(VERSION).tar.xz is ready)

dist-svn:
	svn export -q -rBASE . $(PACKAGE)-$(VERSION)
	tar cfa $(PACKAGE)-$(VERSION).tar.xz $(PACKAGE)-$(VERSION)
	rm -rf $(PACKAGE)-$(VERSION)

dist-git:
	git archive --prefix $(NAME)-$(VERSION)/ HEAD | xz -9 > ../$(NAME)-$(VERSION).tar.xz

clean:
	rm -rf svn

submit: clean ci
	mdvsys submit $(NAME)