summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 042965ba673fb752065de66e1da667259cf3b7a6 (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
PREFIX = 
BINDIR = $(PREFIX)/usr/bin
MANDIR = $(PREFIX)/usr/man
SBINDIR = $(PREFIX)/usr/sbin
XBINDIR = $(PREFIX)/usr/X11R6/bin
URPMIDIR = $(PREFIX)/etc/urpmi
LOCALEDIR = $(PREFIX)/usr/share/locale


.PHONY: install clean

install: autoirpm.update-all
	$(MAKE) -C po $@
	install -d $(BINDIR) $(SBINDIR) $(XBINDIR) $(URPMIDIR) $(MANDIR)/man8
	install -m 4755 urpmi $(BINDIR)
	install _irpm rpm-find-leaves $(BINDIR)
	install -m 644 autoirpm.deny $(URPMIDIR)
	for i in *.8; do bzip2 -c $$i > $(MANDIR)/man8/$$i.bz2 ; done
	install urpmi.addmedia autoirpm.update autoirpm.uninstall $(SBINDIR)
	install -s autoirpm.update-all $(SBINDIR)
	ln -sf urpmi.addmedia $(SBINDIR)/urpmi.removemedia
	ln -sf urpmi.addmedia $(SBINDIR)/urpmi.update
	install gurpmi $(XBINDIR)

autoirpm.update-all: %: %.cc
	$(CXX) -I/usr/include/rpm -g $< -lrpm -ldb1 -lz -o $@

tar: clean
	cd .. ; tar cfy urpmi.tar.bz2 urpmi

po:
	$(MAKE) -C $@

clean:
	$(MAKE) -C po $@
	rm -f *~ autoirpm.update-all