summaryrefslogtreecommitdiffstats
path: root/perl-install/Makefile.drakxtools
blob: 1128dedb5b0b7ac6a25573299a3f5efe4618a74d (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
include Makefile.config

DIRS = ddcprobe serial_probe share/po Newt c resize_fat
NAME = libDrakX
PREFIX = 
LIBDIR = $(PREFIX)/usr/lib
DATADIR = $(PREFIX)/usr/share
BINDEST = $(PREFIX)/usr/bin
SBINDEST = $(PREFIX)/usr/sbin
ETCDEST = $(PREFIX)/etc/gtk
BINX11DEST = $(PREFIX)/usr/X11R6/bin
LIBX11DEST = $(PREFIX)/usr/X11R6/lib/X11
LIBDEST = $(LIBDIR)/$(NAME)
PIXDIR = $(DATADIR)/$(NAME)/pixmaps
.PHONY: $(DIRS)

all: $(DIRS)

$(DIRS):
	install -d auto
	rm standalone ; ln -s . standalone
	rm -f po/DrakX.pot # force rebuild of po's
	$(MAKE) -C $@

install:
	install -d $(BINDEST) $(ETCDEST) $(SBINDEST) $(DATADIR) $(LIBDEST) $(BINX11DEST) $(LIBX11DEST) $(PIXDIR) $(DIRS:%=$(LIBDEST)/%)
	install -d $(LIBDEST)/sbus_probing
	install $(STANDALONEPMS) $(SBINDEST)
	install -s ddcprobe/ddcxinfos serial_probe/serial_probe $(SBINDEST)
	ln -s ../../$(patsubst $(PREFIX)/usr%,%,$(SBINDEST))/XFdrake $(BINX11DEST)/Xdrakres

	install -m 644 *.pm $(LIBDEST)
	install -m 644 pixmaps/* $(PIXDIR)
	install -m 644 share/diskdrake.rc $(ETCDEST)
	install -m 644 share/wizard.rc $(ETCDEST)
	install -m 644 $(patsubst %,Newt/%.pm,Newt) $(LIBDEST)/Newt
	install -m 644 $(patsubst %,c/%.pm,stuff) $(LIBDEST)/c
	install -m 644 $(patsubst %,sbus_probing/%.pm,main) $(LIBDEST)/sbus_probing
	install -m 644 $(patsubst %,resize_fat/%.pm,main any boot_sector c_rewritten dir_entry directory fat info_sector io) $(LIBDEST)/resize_fat
	find $(LIBDEST) -name "*.pm" | xargs perl -pi -e '$$_ = "\n" if /\s*use\s+(diagnostics|vars|strict)/'

	$(MAKE) -C share/po install DATADIR=$(DATADIR) NAME=$(NAME)

	cp -rf auto icons $(LIBDEST)