PACKAGE=drakxtools PKGVERSION:=$(shell rpm -q --qf '%{VERSION}\n' --specfile $(PACKAGE).spec|head -n 1) RELEASE:=$(shell rpm -q --qf '%{RELEASE}\n' --specfile $(PACKAGE).spec|head -n 1) TAG := $(shell echo "V$(PKGVERSION)_$(RELEASE)" | tr -- '-.' '__') include Makefile.config POFILES = $(shell ls share/po/*.po) MOFILES = $(POFILES:%.po=%.mo) DISTFILES = *.pm $(PMS_DIRS) Makefile Makefile.config apps.net_monitor ddcprobe drakxtools.spec pam.net_monitor serial_probe share/po share/diskdrake.rc $(STANDALONEPMS) standalone/icons pixmaps pixmaps/langs standalone/interactive_http rpcinfo-flushed.c standalone/service_harddrake.sh OTHERS = $(OTHERDIRS) $(OTHERFILES) OTHERDIRS = tools/ddcprobe tools/serial_probe OTHERFILES = tools/rpcinfo-flushed.c .PHONY: all $(DIRS) install clean stage2 full_stage2 all: list_modules.pm TAGS $(DIRS) xs: $(DIRS) list_modules.pm: ln -sf ../kernel/list_modules.pm TAGS: $(ALLPMS) @etags -o - $^ /usr/lib/perl5/*/*/MDK/Common/*.pm | ./perl2etags > $@ clean: for i in $(DIRS) share/po; do $(MAKE) -C $$i clean; done;: rm -rf auto ../drakxtools.tar.bz2 *.bak find . -name "*~" -o -name ".#*" -o -name "TAGS" -o -name "*.old" | xargs rm -f check: $(MAKE) -C share/po check perl -I. -Mlang -e 'lang::check' perl -I. -Mkeyboard -e 'keyboard::check' localcopy: clean rm -rf standalone/pixmaps $(MAKE) -C ../tools clean || : cd .. ; rm -rf $(PACKAGE)-$(PKGVERSION) ; cp -af perl-install $(PACKAGE)-$(PKGVERSION) ; cp -af $(OTHERS) $(PACKAGE)-$(PKGVERSION) cd @make nuke_perl $(DIRS): install -d auto $(MAKE) -C $@ test_pms: perl_checker install2.pm install_steps_gtk.pm install_steps_stdio.pm partition_table/*.pm standalone/{harddrake2,diskdrake,draksec} test_pms_all: perl_checker $(shell echo $(ALLPMS) | perl -pe 's!(printer|share/advertising)\S+!!g') %.mo: %.po msgfmt -o $@ $< install_pms: $(DIRS) for i in `perl -ne 's/sub (\w+?)_?(\(\))? {.*/$$1/ and print' commands.pm` sync; do ln -sf commands $(DEST)/usr/bin/$$i; done install -d $(DESTREP4PMS) find $(DESTREP4PMS) -name "*.pm.gz" | xargs rm -f for i in $(PMS); do \ dest=$(DESTREP4PMS)/`dirname $$i`; \ install -d $$dest; \ perl -ne 'print' $$i > $(DESTREP4PMS)/$$i; \ perl -pe 's/#[-+].*//; $$_ = "\n" if (/^=(head|begin)/ .. /^=cut/) || /use (diagnostics|strict|vars|warnings)/' $$i > $(DESTREP4PMS)/$$i; \ done if [ "x$(PERL_INSTALL_DEBUG)" == "x" ]; then \ perl -pi -e 's|#!/usr/bin/perl -d.*\n|#!/usr/bin/perl\n|' $(DESTREP4PMS)/install2; \ else \ perl -pe 's|#!/usr/bin/perl.*\n|#!/usr/bin/perl -d \n|' install2 > $(DESTREP4PMS)/install2; \ fi \ rm -f $(DESTREP4PMS)/{bootlook,tinyfirewall}.pm cp share/*.rc $(DESTREP4PMS) chmod a+x $(DESTREP4PMS)/install2 chmod a+x $(DESTREP4PMS)/commands mo_files : $(MOFILES) get_needed_files: $(DIRS) mo_files $(MAKE) -C share @if rpm -q XFree86-VGA16 | grep -q 29mdk; then echo "XFree86-VGA16 29mdk is bad, downgrade to 28mdk" ; exit 1 ; fi # export PERL_INSTALL_TEST=1 ; strace -f -e trace=file -o '| grep -v "(No such file or directory)" | sed -e "s/[^\"]*\"//" -e "s/\".*//" | grep "^/" | grep -v -e "^/tmp" -e "^/home" -e "^/proc" -e "^/var" -e "^/dev" -e "^/etc" -e "^/usr/lib/rpm" > /tmp/list ' $(PERL) -d install2 < /dev/null eval `perl -V:version`; \ cat share/list `../tools/specific_arch share/list` | \ perl -pe "s/ARCH/$(ARCH)/g ; s/PERL_VERSION/$$version/g ; s|/LIB/|/$(LIB)/|g " | \ perl -lpe '@l = glob; !m|\*.*/| || @l == 1 and $$_ = join("\n", @l)' > /tmp/list rpm -ql perl-Gtk2 perl-Glib | grep '^/usr/lib/perl5' >> /tmp/list @missing=`perl -lne 'print if !-e $$_' /tmp/list`; [ -z "$$missing" ] || { echo "missing or multiple files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$missing" ; echo "missing or multiple files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; } find auto -follow -name "*.so" >> /tmp/list for i in $(LOCALFILES) `cat /tmp/list` ; do \ ldd $$i 2>/dev/null | grep "=>" | perl -pe 's/.*=> //; s/ .*//; s,^/lib/.*?/,/lib/,' | sort | uniq >> /tmp/list; \ done perl -Mlang -I. -e 'print "$$_\n" foreach lang::console_font_files()' >> /tmp/list install -d $(DEST)/etc install -d $(DEST)/etc/sysconfig/network-scripts install -d $(DEST)/lib install -d $(DEST)/$(LIB) install -d $(DEST)/bin install -d $(DEST)/usr/bin install -d $(DEST)/usr/lib install -d $(DEST)/usr/$(LIB) install -d $(DEST)/usr/share install -d $(DEST)/usr/share/gtk install -d $(DEST)/usr/share/xmodmap install -d $(DEST)/usr/X11R6/lib/X11 install -d $(ROOTDEST)/Mandrake/base install -s $(LOCALFILES) $(DEST)/usr/bin # cp -f $(LOCALFILES2) $(DEST)/usr/bin ln -s ../X11R6/lib/X11 $(DEST)/usr/lib/X11 ifeq (sparc,$(ARCH)) cp -a /usr/X11R6/lib/X11/xkb $(DEST)/usr/X11R6/lib/X11 rm -f $(DEST)/usr/X11R6/lib/X11/xkb/compiled ln -s /tmp $(DEST)/usr/X11R6/lib/X11/xkb/compiled ln -s /usr/X11R6/lib/X11/xkb/xkbcomp $(DEST)/usr/bin/xkbcomp endif ifeq (i386,$(ARCH)) install -s /sbin/cardmgr $(DEST)/usr/bin endif for i in `cat /tmp/list`; do \ if (echo $$i | grep -q "lib/[^/]*\.so"); then \ install -s $$i $(DEST)/lib; \ elif (echo $$i | grep -q "lib64/[^/]*\.so"); then \ install -s $$i $(DEST)/lib64; \ else \ d=$$i; \ (echo $$d | grep -q "^[^/]") && d="$(REP4PMS)/$$d"; \ d=`echo $(DEST)/$$d | sed 's/\/usr\/local\//\/usr\//'`; \ install -d `dirname $$d` && \ if (echo $$i | grep -q "\.pm"); then \ perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \ elif (echo $$i | grep -q "\.so"); then \ install -s $$i $$d; \ else \ cp -f $$i $$d; \ fi; \ fi; \ done perl -pi -e 's/\s*use\s+(warnings|diagnostics|strict|vars|warnings).*//g' $(DEST)/usr/*/*/*/utf8_heavy.pl mv -f $(DEST)/bin/* $(DEST)/sbin/* $(DEST)/usr/bin cd $(DEST)/usr/bin ; mv insmod insmod_ rmdir $(DEST)/bin $(DEST)/sbin perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases ifeq (i386,$(ARCH)) cp ../tools/i386/busybox $(DEST)/usr/bin endif ifeq (x86_64,$(ARCH)) cp ../tools/x86_64/busybox $(DEST)/usr/bin/ endif ifeq (ia64,$(ARCH)) ln -sf bash $(DEST)/usr/bin/sh else ln -sf ash $(DEST)/usr/bin/sh endif for i in fonts keyboards locales keymaps; do tar xfj `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done grep ChangeLog CVS/Entries > $(DEST)/usr/share/VERSION gzip -9f $(DEST)/usr/share/ldetect-lst/* cd share ; cp -a consolefonts $(DEST)/usr/share -cd share ; cp -f *.png $(DEST)/usr/share -cd pixmaps ; cp -af *.png *.xpm langs $(DEST)/usr/share ; rm -f $(DEST)/usr/share/wiz_* unneeded=`perl -I. -Mlang -e 'lang::get_unneeded_png_lang_files'`; cd $(DEST)/usr/share; rm -f $$unneeded cd share ; cp compssUsers compssUsers.* rpmsrate $(ROOTDEST)/Mandrake/base clean-rpmsrate $(ROOTDEST)/Mandrake/base/rpmsrate $(ROOTDEST)/Mandrake/RPMS* for i in ../kernel/modules.description ../kernel/all.modules/modules.cz*; do cp -f $$i $(DEST)/lib/; done $(MAKE) -C share/po install SUDO= NAME=libDrakX LOCALEDIR=$(DEST)/usr/share/locale_special # ar and fa are disabled as arabic font doesn't work on install # ga and sl are disabled because too few messages are translated rm -rf $(DEST)/usr/share/locale_special/{ar,fa,ga,sl} ifeq (i386,$(ARCH)) cp -a /etc/pcmcia $(DEST)/etc ../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../kernel/all.modules/`cat ../kernel/all.kernels/.main`/modules.dep endif find $(DEST) -name CVS | xargs rm -rf full_stage2: if [ `id -u` = 0 ]; then rm -rf $(DEST); else $(SUDO) rm -rf $(DEST); fi mkdir -p $(DEST) $(MAKE) get_needed_files $(MAKE) stage2 stage2: $(MAKE) install_pms find $(DEST)/usr -name "*.pm" | xargs gzip -9f cd $(DEST)/usr/lib/perl5 ; gunzip 5.*/{PerlIO,Exporter}.pm.gz 5.*/*-linux-thread-multi/{XSLoader,lib}.pm.gz vendor_perl/*/*-linux-thread-multi/PerlIO/gzip.pm.gz $(ROOTDEST)/misc/make_mdkinst_stage2 $(DEST) $(ROOTDEST)/Mandrake/base/mdkinst_stage2 # rules to build a test rpm localrpm: localdist buildrpm localsrpm: spec_test localdist buildsrpm srpm: spec_test cvstag localsrpm localdist: cleandist localcopy tar cleandist: rm -rf ../$(PACKAGE)-$(PKGVERSION) ../$(PACKAGE)-$(PKGVERSION).tar.bz2 spec_test: @if [[ -z "$(PKGVERSION)" ]]; then echo "unable to get spec version"; exit 3;fi @if [[ -z "$(RELEASE)" ]]; then echo "unable to get spec release"; exit 2;fi tar: cd ../$(PACKAGE)-$(PKGVERSION) && perl -pi -e 's/^C_RPM.*/C_RPM=0/; s/^C_DRAKX.*/C_DRAKX=0/' c/Makefile cd ../$(PACKAGE)-$(PKGVERSION) && perl -pi -e 's/^all: help/all:/' share/po/Makefile cd ../$(PACKAGE)-$(PKGVERSION) && rm -rf install* pkgs.pm help.pm ftp.pm http.pm crypto.pm t.pm debug.log `find -name CVS` cd ../$(PACKAGE)-$(PKGVERSION) && mv -f Makefile.drakxtools Makefile cd ../$(PACKAGE)-$(PKGVERSION) && rm -f list_modules.pm && cp -f ../kernel/list_modules.pm . cd ..; tar cfj $(PACKAGE)-$(PKGVERSION).tar.bz2 $(patsubst %,$(PACKAGE)-$(PKGVERSION)/%,$(DISTFILES)) cd ..; rm -rf $(PACKAGE)-$(PKGVERSION) buildrpm: rpm -ta ../$(PACKAGE)-$(PKGVERSION).tar.bz2 buildsrpm: rpm -ts --nodeps ../$(PACKAGE)-$(PKGVERSION).tar.bz2 # rules to build a distributable rpm rpm: cvstag dist buildrpm slowsrpm: spec_test cvstag dist buildsrpm dist: cleandist export tar export: cd ..; cvs export -d $(PACKAGE)-$(PKGVERSION) -r $(TAG) $(PACKAGE) cd ../$(PACKAGE)-$(PKGVERSION) && rm -rf $(OTHERDIRS) && set -x && for f in $(OTHERDIRS); do cvs -d `cat ../CVS/Root` export -r $(TAG) -d `basename $$f` gi/$$f; done cd ..; set -x && for f in $(OTHERFILES); do cvs -d `cat ../CVS/Root` export -r $(TAG) -d $(PACKAGE)-$(PKGVERSION) gi/$$f; done @make nuke_perl cvstag: cvs tag $(CVSTAGOPT) $(TAG) cd ..; cvs tag $(CVSTAGOPT) $(TAG) $(OTHERS) nuke_perl: find ../$(PACKAGE)-$(PKGVERSION) -name '*.pm' | xargs perl -pi -e 's/\s*use\s+(diagnostics|strict|vars|warnings).*//g' find ../$(PACKAGE)-$(PKGVERSION)/standalone -type f | xargs perl -pi -e 's/\s*use\s+(diagnostics|strict|vars|warnings).*//g' ddprinter,isprinterconfigured): remove temp variablesThierry Vignaud2003-05-201-4/+2 * updated German, Estonian and Finnish filesPablo Saratxaga2003-05-203-1420/+1964 * (find_servers): chomp is uneededThierry Vignaud2003-05-201-1/+0 * (put_font_dir): $/variable is unlikely what was initially intendedThierry Vignaud2003-05-201-10/+3 * (chk_empty_xfs_path):Thierry Vignaud2003-05-201-2/+2 * (file_ok_sel) prevent potential crash in perl regexp engine if sg badThierry Vignaud2003-05-201-1/+1 * (find_exports) better behavior when regexp does not matchThierry Vignaud2003-05-201-1/+1 * for whatever reason, the second part of detect_bootloader()Thierry Vignaud2003-05-201-1/+1 * update french translationThierry Vignaud2003-05-201-67/+54 * better explanation of the wp fieldThierry Vignaud2003-05-201-1/+1 * fix #3960: divide by zero execptionThierry Vignaud2003-05-201-1/+1 * perl_checker compliantDamien Chaumette2003-05-201-8/+7 * first bits of 9.2-0.1mdkThierry Vignaud2003-05-201-2/+6 * fix #3952: do not pass extra argument (gc alteredThierry Vignaud2003-05-201-1/+1 * - fix #3616 (draksec discarding changes)Thierry Vignaud2003-05-201-2/+2 * perl_checker fixThierry Vignaud2003-05-201-2/+2 * add a bug referenceThierry Vignaud2003-05-191-1/+1 * some drakconnect cleanupsThierry Vignaud2003-05-191-5/+2 * in standalone drakboot, raise a wait message window so that the user can figureThierry Vignaud2003-05-191-0/+2 * dialog window is already modalThierry Vignaud2003-05-191-1/+0 * - (read_location, rip_location): simplify loop condition since once we getThierry Vignaud2003-05-191-5/+3 * - (get_cups_autoconf, set_cups_autoconf, get_usermode, set_usermode): simplifyThierry Vignaud2003-05-191-72/+13 * (gimp::pop_spaces): consolidate skipping of lines that are space endedThierry Vignaud2003-05-191-8/+9 * perl_checker fixesThierry Vignaud2003-05-198-308/+297 * localize drive capabilites (aka burning, dvd managment, ...)Thierry Vignaud2003-05-191-0/+5 * fix #3560 (drakboot not updating bootloader label): the only confusingThierry Vignaud2003-05-192-3/+15 * further fix #2826 (lilo failling to handle entry with spaces): replaceThierry Vignaud2003-05-191-0/+1 * when configuring to install grub bootloader, we first install lilo, then grub.Thierry Vignaud2003-05-191-1/+1 * let further consolidate make_label_lilo_compatible()Thierry Vignaud2003-05-191-2/+2 * fix network::netconnect::save_conf() calleeThierry Vignaud2003-05-191-1/+1 * updated Spanish translationsFabián Mandelbaum2003-05-191-221/+176 * simplifyThierry Vignaud2003-05-191-5/+2 * do not drop return values from regexp but use them to ensure we do notThierry Vignaud2003-05-191-1/+1 * move expert stuff under the "advanced" button like in all other drakx/drakxto...Thierry Vignaud2003-05-191-7/+6 * %langs: first column is supposed to be localized in englishThierry Vignaud2003-05-191-3/+3 * last 9.1-38mdk bitsThierry Vignaud2003-05-191-1/+7 * update perl-gtk0 users list (drakcronat being ported to gtk+2)Thierry Vignaud2003-05-191-1/+4 * first bits of 9.1-38mdkThierry Vignaud2003-05-161-2/+5 * updated pot filePablo Saratxaga2003-05-16