summaryrefslogtreecommitdiffstats
path: root/perl-install/Makefile
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-07-13 16:23:45 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-07-13 16:23:45 +0000
commit39b51c96e54f880be2d2fb909f44118a6c209d7c (patch)
tree86b09fbe4e5042b5fa5b4269d79cf9042993a568 /perl-install/Makefile
parent925e58d2b3b5fc4adeefcf9f7c3062ba5efde627 (diff)
downloaddrakx-backup-do-not-use-39b51c96e54f880be2d2fb909f44118a6c209d7c.tar
drakx-backup-do-not-use-39b51c96e54f880be2d2fb909f44118a6c209d7c.tar.gz
drakx-backup-do-not-use-39b51c96e54f880be2d2fb909f44118a6c209d7c.tar.bz2
drakx-backup-do-not-use-39b51c96e54f880be2d2fb909f44118a6c209d7c.tar.xz
drakx-backup-do-not-use-39b51c96e54f880be2d2fb909f44118a6c209d7c.zip
*** empty log message ***
Diffstat (limited to 'perl-install/Makefile')
-rw-r--r--perl-install/Makefile66
1 files changed, 38 insertions, 28 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 1e8321b0b..d05997e96 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -2,8 +2,8 @@ SO_FILES = c/blib/arch/auto/c/c.so
PMS = *.pm c/*.pm resize_fat/*.pm commands diskdrake
DEST = /tmp/t
DESTREP4PMS = $(DEST)/usr/bin/perl-install
-PERL = ./perl
-BINS = /bin/ash /sbin/mke2fs $(PERL)
+PERL = perl
+LOCALFILES = $(PERL) mouseconfig fr.map
.PHONY: all tags install clean verify_c
@@ -18,7 +18,13 @@ clean:
find . -name "*~" -o -name "TAGS" -o -name "*.old" | xargs rm -f
tar: clean
- cd .. ; tar cfy perl-install.tar.bz2 --exclude perl-install/perl perl-install
+ cd .. ; tar cfy perl-install.tar.bz2 $(LOCALFILES:%=--exclude %) perl-install
+
+tar-diskdrake: clean
+ cd .. ; cp -af perl-install diskdrake
+
+ l=`perl2fcalls -uses -excludec diskdrake | sort | uniq | sed -e 's/::/\//' -e 's/^/diskdrake\//' -e 's/$$/.pm/'` ; \
+ cd .. ; tar cfvy diskdrake.tar.bz2 diskdrake/diskdrake $$l
c/c.xs: c/c.xs.pm
rm -f $@
@@ -45,7 +51,7 @@ install_pms: $(SO_FILES)
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
@@ -55,39 +61,43 @@ install_pms: $(SO_FILES)
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
- perl -pi -e 's|/usr/local/|/usr/|' /tmp/list
+# 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
+ cp -f list /tmp/list
+ for i in $(LOCALFILES) `cat /tmp/list` ; do \
+ ldd $$i 2>/dev/null | sed -e 's/.*=> //' -e 's/ .*//' | uniq | sort >> /tmp/list; \
+ done
+ install -d $(DEST)/lib
install -d $(DEST)/bin
install -d $(DEST)/usr/bin
- for i in $(BINS) `grep "\.so" /tmp/list`; do \
- install -s $$i $(DEST)/lib; \
- 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; \
+ install -s $(LOCALFILES) $(DEST)/usr/bin
+
+ for i in `cat /tmp/list`; do \
+ if (echo $$i | grep "lib/[^/]*\.so"); then \
+ install -s $$i $(DEST)/lib; \
else \
- cp -f $$i $(DEST)/$$i; \
- fi && \
- strip $(DEST)/$$i 2>/dev/null || true; \
+ d=`echo $(DEST)/$$i | sed -e 's/\/usr\/local\//\/usr\//' -e 's/\/sbin\//\/bin\//'`; \
+ install -d `dirname $$d` && \
+ if (echo $$i | grep "\.pm"); then \
+ perl -pe '$$_ eq "__END__" and exit(0);' $$i > $$d; \
+ else \
+ cp -f $$i $$d; \
+ strip $$d 2>/dev/null || true; \
+ fi; \
+ fi; \
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
+ ln -sf ash $(DEST)/bin/sh
+ ln -sf ../../bin/sh $(DEST)/usr/bin/sh
+ ln -sf ../../bin/mke2fs $(DEST)/usr/bin/mke2fs
+
+ install -d $(DEST)/lib/fonts
+ cp -a /usr/lib/X11/fonts/misc $(DEST)/lib/fonts
- echo -e "#!/usr/bin/perl\n\nsymlink '/tmp/rhimage/usr/lib/perl5', '/usr/lib/perl5';\nexec '/bin/sh'" > $(DEST)/usr/bin/runinstall2
+ echo -e "#!/usr/bin/perl\n\nsymlink '/tmp/rhimage/usr/lib/perl5', '/usr/lib/perl5';\nexec '/usr/bin/sh'" > $(DEST)/usr/bin/runinstall2
chmod a+x $(DEST)/usr/bin/runinstall2
as_root:
@@ -99,7 +109,7 @@ as_root:
full_stage2:
rm -rf $(DEST)/[^M]*
- ln -sf .. $(DEST)/Mandrake/instimage
+ rm -f $(DEST)/Mandrake/instimage ; ln -s .. $(DEST)/Mandrake/instimage
@#mkdir -p $(DEST)/Mandrake/base
@#ln -s .. $(DEST)/Mandrake/instimage
$(MAKE) get_needed_files