VERSION = 5.50 NAME = rpmdrake DIRS = po data mime PREFIX = /usr/local DATADIR = $(PREFIX)/share BINDIR = $(PREFIX)/bin SBINDIR = $(PREFIX)/sbin LIBEXECDIR = $(PREFIX)/libexec RPM=$(shell rpm --eval %_topdir) PERL_VENDORLIB=$(DESTDIR)/$(shell perl -V:installvendorlib | perl -pi -e "s/.*=//; s/[;']//g") all: dirs dirs: @for n in . $(DIRS); do \ [ "$$n" = "." ] || make -C $$n || exit 1 ;\ done install: $(ALL) find -name '*.pm' -o -name rpmdrake -o -name MageiaUpdate | xargs ./simplify-drakx-modules ./simplify-drakx-modules {gurpmi.addmedia,edit-urpm-sources.pl} @for n in $(DIRS); do make -C $$n install; done install -d $(BINDIR) $(SBINDIR) $(LIBEXECDIR) $(PREFIX)/share/polkit-1/actions install rpmdrake MageiaUpdate gurpmi.addmedia $(LIBEXECDIR) install edit-urpm-sources.pl $(LIBEXECDIR)/drakrpm-edit-media install polkit/wrappers/* $(BINDIR) install polkit/policy/* $(PREFIX)/share/polkit-1/actions ln -sf drakrpm-edit-media $(BINDIR)/edit-urpm-sources.pl ln -sf rpmdrake $(BINDIR)/drakrpm ln -sf MageiaUpdate $(BINDIR)/drakrpm-update install -d $(DATADIR)/rpmdrake/icons install -m644 icons/*.png $(DATADIR)/rpmdrake/icons install -m644 gui.lst $(DATADIR)/rpmdrake mkdir -p $(PERL_VENDORLIB)/Rpmdrake install -m 644 rpmdrake.pm $(PERL_VENDORLIB) install -m 644 Rpmdrake/*.pm $(PERL_VENDORLIB)/Rpmdrake perl -pi -e "s/version = 1/version = \'$(VERSION)'/" $(PERL_VENDORLIB)/Rpmdrake/init.pm clean: @for n in $(DIRS); do make -C $$n clean; done dis: dist dist: clean rm -rf ../$(NAME)-$(VERSION).tar* @git archive --prefix=$(NAME)-$(VERSION)/ HEAD | xz >../$(NAME)-$(VERSION).tar.xz; $(info $(NAME)-$(VERSION).tar.xz is ready) gui.lst: export LC_COLLATE=C; ( echo -e "cedega-mandriva\npicasa\nVariCAD_2009-en\nVariCAD_View_2009-en\nVMware-Player" ; \ urpmf "/usr/share/((applnk|applications(|/kde)|apps/kicker/applets)/|kde4/services/plasma-applet).*.desktop" |sed -e 's!:.*!!') \ | sort -u > gui.lst check: rm -f po/*.pot @make -C po rpmdrake.pot .PHONY: gui.lst