diff options
author | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
commit | 0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch) | |
tree | 33f7ac905998f9ad6d85090f777ee4c0d0c67032 /Makefile | |
parent | d5c526273db473a7d87a26000585900fc10dda7d (diff) | |
download | drakx-topic/unlabeled-1.1.1.tar drakx-topic/unlabeled-1.1.1.tar.gz drakx-topic/unlabeled-1.1.1.tar.bz2 drakx-topic/unlabeled-1.1.1.tar.xz drakx-topic/unlabeled-1.1.1.zip |
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 235 |
1 files changed, 126 insertions, 109 deletions
@@ -1,114 +1,131 @@ -SO_FILES = c/blib/arch/auto/c/c.so -PMS = *.pm resize_fat/*.pm commands diskdrake -DEST = /tmp/t -DESTREP4PMS = $(DEST)/usr/bin/perl-install -PERL = ./perl -BINS = /bin/ash /sbin/mke2fs $(PERL) +ARCH := $(patsubst i%86,i386,$(shell uname -m)) +ARCH := $(patsubst sparc%,sparc,$(ARCH)) + +RELEASE_BOOT_IMG = hd.img hdreiser.img cdrom.img network.img +ifeq (i386,$(ARCH)) +RELEASE_BOOT_IMG += pcmcia.img blank.img all.img other.img +endif +ifeq (sparc,$(ARCH)) +BOOT_IMG = live.img tftp.img tftprd.img live64.img tftp64.img tftprd64.img +RELEASE_BOOT_IMG += hd64.img cdrom64.img network64.img +endif +BOOT_IMG += $(RELEASE_BOOT_IMG) + +BOOT_RDZ = $(BOOT_IMG:%.img=%.rdz) +BINS = install/install install/full-install install/local-install install/installinit/init +DIRS = tools install install/installinit perl-install + +ROOTDEST = /export +UPLOAD_DEST_ = ~/cooker +UPLOAD_DEST = $(UPLOAD_DEST_)/cooker +UPLOAD_DEST_CONTRIB = $(UPLOAD_DEST_)/contrib +UPLOAD_SPARC_DEST = /mnt/BIG/distrib/sparc + +.PHONY: dirs $(FLOPPY_IMG) install + +install: build autoboot rescue + for i in images misc Mandrake Mandrake/base; do install -d $(ROOTDEST)/$$i ; done + cp -f $(RELEASE_BOOT_IMG) $(ROOTDEST)/images +ifeq (alpha,$(ARCH)) + cp -f $(BOOT_RDZ) $(ROOTDEST)/boot + cp -f vmlinux.gz $(ROOTDEST)/boot/instboot.gz + make -C tools/$(ARCH)/cd install ROOTDEST=$(ROOTDEST) +endif + install live_update $(ROOTDEST)/live_update + make -C perl-install full_stage2 + +build: $(BOOT_IMG) + +autoboot: +ifeq (i386,$(ARCH)) + install -d $(ROOTDEST)/boot + cp -f vmlinuz {hd,cdrom,pcmcia,network,all,other}.rdz $(ROOTDEST)/boot + /usr/sbin/rdev -v $(ROOTDEST)/boot/vmlinuz 788 +endif + +dirs: + for i in $(DIRS); do make -C $$i; done + +rescue: modules + make -C $@ + +network_ks.rdz pcmcia_ks.rdz: %_ks.rdz: %.rdz + +$(BOOT_RDZ): dirs modules + ./make_boot_img $@ $(@:%.rdz=%) + +$(BOOT_IMG): %.img: %.rdz + ./make_boot_img $@ $(@:%.img=%) -.PHONY: all tags install clean verify_c +tar: clean + rpm -qa > needed_rpms.lst + cd .. ; tar cfy gi.tar.bz2 gi + rm needed_rpms.lst -all: $(SO_FILES) +modules: + `./tools/specific_arch ./update_kernel` -tags: - etags -o - $(PMS) | perl2etags > TAGS +$(BOOT_IMG:%=%f): %f: % + dd if=$< of=/dev/fd0 + xmessage "Floppy done" clean: - test ! -e c/Makefile || $(MAKE) -C c clean - find . -name "*~" -name "TAGS" -name "*.old" | xargs rm -f - -tar: clean - cd .. ; tar cfy perl-install.tar.bz2 --exclude perl-install/perl perl-install - -c/c.xs: c/c.xs.pm - chmod u+w $@ - perl $< > $@ - chmod a-w $@ - -$(SO_FILES): c/c.xs - test -e c/Makefile || (cd c; perl Makefile.PL) - $(MAKE) -C c - -test_pms: verify_c - perl2fcalls -excludec install2.pm - (for i in $(PMS); do perl -cw -I. -Ic -Ic/blib/arch $$i || exit 1 ; done) - -verify_c: - ./verify_c $(PMS) - -install_pms: $(SO_FILES) - for i in `perl -ne 's/sub (\w+?)_? {.*/$$1/ and print' commands.pm`; do ln -sf commands $(DEST)/usr/bin/$$i; done - - install -d $(DESTREP4PMS) - for i in $(PMS); do \ - dest=$(DESTREP4PMS)/`dirname $$i`; \ - install -d $$dest; \ - perl -ne 'print #unless /^use (diagnostics|vars|strict)/' $$i > $(DESTREP4PMS)/$$i; \ - done - @# cp -f $$i $$dest; \ - cp diskdrake.rc $(DESTREP4PMS) - ln -sf perl-install/install2.pm $(DEST)/usr/bin/install2 - ln -sf perl-install/commands $(DEST)/usr/bin/commands - chmod a+x $(DESTREP4PMS)/install2.pm - chmod a+x $(DESTREP4PMS)/commands - - cp -af */blib/arch/auto $(DESTREP4PMS) - find $(DESTREP4PMS) -name "*.so" | xargs strip - -full_tar: - cp -af /usr/lib/perl5/site_perl/5.005/i386-linux/Gtk* $(DESTREP4PMS) - cp -af /usr/lib/perl5/site_perl/5.005/i386-linux/auto/Gtk $(DESTREP4PMS)/auto - find $(DESTREP4PMS) -name "*.so" | xargs strip - cd $(DESTREP4PMS)/.. ; tar cfz /tmp/perl-install.tgz perl-install - -get_needed_files: $(SO_FILES) - 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.pm < /dev/null - - install -d $(DEST)/bin - install -d $(DEST)/usr/bin - for i in $(BINS) `grep "\.so" /tmp/list`; do \ - install -s $$i $(DEST)/usr/bin; \ - ldd $$i | sed -e 's/.*=> //' -e 's/ .*//' >> /tmp/list; \ - done - for i in `sort /tmp/list | uniq`; do \ - install -d $(DEST)/`dirname $$i` && \ - if (echo $$i | grep "\.pm"); then \ - perl -pe '$$_ eq "__END__" and exit(0);' $$i > $(DEST)/$$i; \ - else \ - cp -f $$i $(DEST)/$$i; \ - fi && \ - strip $(DEST)/$$i 2>/dev/null || true; \ - done - mv $(DEST)/usr/lib/*.so* $(DEST)/lib - - ln -sf ../usr/bin/sh $(DEST)/bin/sh - ln -sf ../usr/bin/tr $(DEST)/bin/tr - ln -sf sh $(DEST)/bin/bash - ln -sf ash $(DEST)/usr/bin/sh - - echo -e "#!/usr/bin/perl\n\nsymlink '/tmp/rhimage/usr/lib/perl5', '/usr/lib/perl5';\nexec '/bin/sh'" > $(DEST)/usr/bin/runinstall2 - chmod a+x $(DEST)/usr/bin/runinstall2 - -as_root: - /bin/dd if=/dev/zero of=/tmp/initrd bs=1k count=4000 - echo y | /sbin/mke2fs /tmp/initrd - losetup /dev/loop0 /tmp/initrd - mount /dev/loop0 /mnt/initrd - chmod a+w /mnt/initrd - -full_stage2: - rm -rf $(DEST)/[^M]* - @#mkdir -p $(DEST)/Mandrake/base - @#ln -s .. $(DEST)/Mandrake/instimage - $(MAKE) get_needed_files - $(MAKE) stage2 - -stage2: - $(MAKE) install_pms - - @#rm -rf /mnt/initrd/* - @#cp -a $(DEST)/* /mnt/initrd - @#sync - @#dd if=/dev/loop0 | gzip -9 > /tmp/t/Mandrake/base/stage2.img - - -# function f() { grep "$*" /usr/include/*.h /usr/include/*/*.h; } + rm -rf $(BOOT_IMG) $(BOOT_RDZ) $(BINS) modules modules64 install_pcmcia_modules vmlinu* System*.map + rm -rf install/*/sbin/install install/*/sbin/init + for i in $(DIRS) rescue; do make -C $$i clean; done + find . -name "*~" -o -name ".#*" | xargs rm -f + +upload: clean install + function upload() { rsync -qSavz --verbose --exclude '*~' -e ssh --delete $(ROOTDEST)/$$1/$$2 mandrake@kenobi:/c/cooker/$$1; } ;\ + upload Mandrake/mdkinst '' ;\ + upload Mandrake/base compss* ;\ + upload Mandrake/base *_stage2.gz ;\ + upload boot '' ;\ + upload misc genbasefiles ;\ + upload misc genhdlist_cz2 ;\ + upload misc make_mdkinst_stage2 ;\ + upload misc packdrake ;\ + upload misc rpm2header ;\ + upload '' live_update ;\ + for i in $(RELEASE_BOOT_IMG); do upload images $$i; done ;\ + echo + + perl -pe 'exit if / DrakX </' perl-install/ChangeLog | tools/mailchangelog + tools/addchangelog perl-install/ChangeLog 'snapshot uploaded' +# cvs commit perl-install/ChangeLog # otherwise i always have a conflict :-( + +upload_firewall: clean install + function upload() { rsync -qSavz --verbose --exclude '*~' -e ssh --delete $(ROOTDEST)/$$1/$$2 mandrake@kenobi:/mnt/BIG/build/corporate/build/Firewall/new/$$1; } ;\ + upload Mandrake/mdkinst '' ;\ + upload Mandrake/base compss* ;\ + upload Mandrake/base *_stage2.gz ;\ + upload boot '' ;\ + upload misc genbasefiles ;\ + upload misc genhdlist_cz2 ;\ + upload misc make_mdkinst_stage2 ;\ + upload misc packdrake ;\ + upload misc rpm2header ;\ + upload '' live_update ;\ + for i in $(RELEASE_BOOT_IMG); do upload images $$i; done ;\ + echo + + perl -pe 'exit if / DrakX </' perl-install/ChangeLog | tools/mailchangelog + tools/addchangelog perl-install/ChangeLog 'snapshot uploaded' +# cvs commit perl-install/ChangeLog # otherwise i always have a conflict :-( + +upload_sparc: + touch /tmp/mdkinst_done + cp -a $(ROOTDEST)/images/* $(UPLOAD_SPARC_DEST)/images ; true + cp -a $(ROOTDEST)/boot/* $(UPLOAD_SPARC_DEST)/boot; true + cp -a $(ROOTDEST)/misc/* $(UPLOAD_SPARC_DEST)/misc; true + rm -rf $(UPLOAD_SPARC_DEST)/Mandrake/mdkinst + cp -a $(ROOTDEST)/Mandrake/mdkinst $(UPLOAD_SPARC_DEST)/Mandrake/mdkinst; true + ( cd $(ROOTDEST)/Mandrake/base; cp mdkinst_stage2.gz rescue_stage2.gz compss compssList compssUsers compssUsers.desktop $(UPLOAD_SPARC_DEST)/Mandrake/base ); true + rm -f /tmp/mdkinst_done + +# mkisofs -r -J -b images/cdrom.img -c images/boot.cat /tmp/r /mnt/disk/ | cdrecord -v -eject speed=6 dev=1,0 - +# as distrib: mv ~/oxygen/oxygen/images ~/tmp/r +# as mandrake: ~distrib/bin/mkisofs -r -b images/cdrom.img -c images/boot.cat -o /home/ftp/linux-mandrake/pub/mirror/oxyiso/oxygen-3.iso ~distrib/tmp/r ~distrib/oxygen/oxygen +# as mandrake: remove old iso in /home/ftp/linux-mandrake/pub/mirror/oxyiso +# as mandrake: cd /home/ftp/linux-mandrake/pub/mirror/oxyiso ; md5sum *.iso > md5sum +# as distrib: mv ~/tmp/r/images ~/oxygen/oxygen |