ppcrcd/trunk: Makefile base.pkgs

sparky cvs at pld-linux.org
Fri Jan 6 21:23:07 CET 2006


Author: sparky
Date: Fri Jan  6 21:23:03 2006
New Revision: 6751

Modified:
   ppcrcd/trunk/Makefile
   ppcrcd/trunk/base.pkgs
Log:
- totally rewritten


Modified: ppcrcd/trunk/Makefile
==============================================================================
--- ppcrcd/trunk/Makefile	(original)
+++ ppcrcd/trunk/Makefile	Fri Jan  6 21:23:03 2006
@@ -1,215 +1,245 @@
 
 #         @_VERSION_@
-VERSION = XP(TM)
+VERSION = big changes
 VER13 = $(shell echo '"$(VERSION)"           ' | cut -c 1-13 )
-# XP means: same shit but with more features
 
-REVISION = HEAD
 SU = sudo
 BCOND = --without python --without smp --without doc
 CFLAGS = -Os -fsigned-char -falign-loops=0 -falign-jumps=0 -falign-functions=0
 
 INITRDMODULES = cdrom ide-cd isofs nls_base
 
-all:	ppcrcd.iso
+OUT = $(PWD)/out
+S = $(OUT)/rpm/SPECS
+R = $(OUT)/rpm/rpms
+P = $(OUT)/rpm/prep
+
+all:	$(OUT)/ppcrcd.iso
 	
 include base.pkgs
-include add.pkgs
+#include add.pkgs
 
-INSTALL = $(shell for RPM in $(I); do echo .$${RPM}_installed; done)
-STOP = $(shell for PKG in $(S); do echo $${PKG}_stop; done)
+INSTALL = $(addprefix $(installed_dir)/,$(I))
+STOP = $(addprefix $(touch)/stop/,$(S))
 
-PWD = $(shell pwd)
+ppcrcd_iso = $(OUT)/ppcrcd.iso
+cdroot = $(OUT)/cdroot
+boot = $(OUT)/boot
+ppcrcd_sqf = $(OUT)/images/ppcrcd.sqf
+root_stripped = $(OUT)/root/stripped
+touch = $(OUT)/touch
+initrd_sqf = $(OUT)/images/initrd.sqf
+root_initrd = $(OUT)/root/initrd
+root_installed = $(OUT)/root/installed
+root_inst = $(OUT)/root/inst
+sources = $(OUT)/rpm/sources
 
-ppcrcd.iso:	ppcrcd.sqf boot
-	rm -rf image
-	mkdir -p image/ppc
-	ln -s ../ppcrcd.sqf image
-	ln -s ../boot image
-	ln -s ../../bootinfo.txt image/ppc
+$(ppcrcd_iso):	$(cdroot) $(boot)/hfs.map files.sort
 	$(SU) mkisofs \
-		-disable-deep-relocation \
-		-follow-links		\
-		-hfs			\
-		-part			\
-		-map boot/hfs.map	\
-		-no-desktop		\
-		-volid "PPCRCD"		\
-		-sysid "PPCRCD"		\
-		-volset "PPCRCD"	\
-		-hfs-volid "PPCRCD"	\
-		-hfs-bless image/ppc	\
-		-chrp-boot		\
-		-rational-rock		\
-		-sort files.sort	\
-		-output	$@		\
-		image
+		-disable-deep-relocation	\
+		-follow-links			\
+		-hfs				\
+		-part				\
+		-map $(boot)/hfs.map		\
+		-no-desktop			\
+		-volid "PPCRCD"			\
+		-sysid "PPCRCD"			\
+		-volset "PPCRCD"		\
+		-hfs-volid "PPCRCD"		\
+		-hfs-bless $(cdroot)/ppc	\
+		-chrp-boot			\
+		-rational-rock			\
+		-sort files.sort		\
+		-output	$@			\
+		$(cdroot)
+		
+$(cdroot):	$(ppcrcd_sqf) $(boot) bootinfo.txt
+	rm -rf $@{,.work}
+	mkdir -p $@.work/ppc
+	ln -s $(ppcrcd_sqf) $@.work
+	cp -a $(boot) $@.work
+	cp -a bootinfo.txt $@.work/boot/ofboot.b
+	ln -s $(PWD)/bootinfo.txt $@.work/ppc
+	mv -f $@{.work,}
+
+$(ppcrcd_sqf):	$(root_stripped) $(STOP) $(POST) $(touch)/pld-release
+	rm -f $@
+	$(SU) /usr/sbin/mksquashfs_lzma \
+		$(root_stripped)	\
+		$@
 
-ppcrcd.sqf:	root.stripped $(STOP) $(POST) pld-release
+$(initrd_sqf):	$(root_initrd)
 	rm -f $@
 	$(SU) /usr/sbin/mksquashfs_lzma \
-		root.stripped  \
+		$(root_initrd)	\
 		$@
 
-initrd.sqf:	root.installed
-	rm -rf initrd.work $@
-	cp -r initrd.dir initrd.work
-	find initrd.work -name .svn | xargs rm -rf
+$(root_initrd):	$(root_installed) initrd.dir
+	rm -rf $@{,.work}
+	cp -r initrd.dir $@.work
+	find $@.work -name .svn | xargs rm -rf
 	sed -e 's/@_VERSION_@/$(VERSION)/g'	\
-		-i initrd.work/linuxrc
+		-i $@.work/linuxrc
 	for MOD in $(INITRDMODULES); do \
-		find root.inst/lib/modules/ -name $$MOD.ko.gz -exec cp "{}" initrd.work/lib/modules ";"; \
+		find $(root_installed)/lib/modules/ -name $$MOD.ko.gz \
+			-exec cp "{}" $@.work/lib/modules ";"; \
 	done
-	gunzip initrd.work/lib/modules/*
-	cd initrd.work/dev; while read T M m N; do	\
+	gunzip $@.work/lib/modules/*
+	cd $@.work/dev; while read T M m N; do	\
 		case "$$T" in					\
 			c|b)	$(SU) mknod $$N $$T $$M $$m;;	\
 			p)	mkfifo $$N;;			\
 			l)	ln -s $$N $$M;;			\
 		esac;					\
 	done < devs
-	rm initrd.work/dev/devs
-	cp root.inst/bin/initrd-busybox initrd.work/bin
-	$(SU) /usr/sbin/mksquashfs_lzma \
-		initrd.work    \
-		$@
+	cp $(root_installed)/bin/initrd-busybox $@.work/bin
+	mv -f $@{.work,}
+
+$(touch)/pld-release:	$(root_stripped)
+	echo "PLD Linux: PPCRCD $(VERSION) ($(shell date -I -u))" | \
+		$(SU) tee $(root_stripped)/etc/pld-release
+	@touch $@
+
+$(touch)/stop/%:	$(root_stripped)
+	$(SU) chroot $(root_stripped) chkconfig --level 2345 \
+		$(@:$(OUT)/touch/stop/%=%) off
+	@touch $@
 
-pld-release:	root.stripped
-	echo "PLD Linux: PPCRCD $(VERSION) ($(shell date -I -u))" > $@
-	$(SU) mv $@ root.stripped/etc/pld-release
-
-%_stop:		root.stripped
-	$(SU) chroot root.stripped chkconfig --level 2345 $(@:%_stop=%) off
-
-boot:	root.installed initrd.sqf yaboot/yaboot
-	mkdir boot.work
-	cp boot.dir/{hfs.map,boot.msg,boot.msg.net,yaboot.conf,yaboot.conf.net,*.help} boot.work
-	rm -f boot.work/*~
+$(boot):	$(root_installed) $(initrd_sqf) yaboot/yaboot boot.dir
+	rm -rf $@{,.work}
+	mkdir -p $@.work
+	cp boot.dir/{hfs.map,boot.msg{,.net},yaboot.conf{,.net},*.help} $@.work
+	rm -f $@.work/*~
 	sed -e 's/"@_VERSION_@"/$(VER13)/g'	\
-		-i boot.work/boot.msg		\
-		-i boot.work/boot.msg.net
-	cp root.inst/boot/vmlinux-* boot.work/vmlinux
-	cp root.inst/boot/vmlinux-* boot.work/vmlinux
-	strip boot.work/vmlinux
-	strip -R.comment boot.work/vmlinux
-	gzip -9 boot.work/vmlinux
-	cp yaboot/yaboot boot.work
-	$(SU) cp initrd.sqf boot.work
-	mv boot.work $@
-
-root.stripped:	root.installed
-	$(SU) rm -rf root.swork
-	#
-	mkdir -p root.swork/dev
-	cd root.swork/dev; while read T M m N; do	\
-		$(SU) mknod $$N $$T $$M $$m;	\
-	done < ../../conf.dir/dev/devs
-	#
-	$(SU) cp -a root.inst/* root.swork
-	#
-	while read TODEL; do $(SU) rm -rf root.swork/$$TODEL; done < todel
-	#
-	$(SU) find root.swork -type f | xargs file | grep ELF | grep "not stripped" | sed "s/:.*//" | xargs $(SU) strip
-	$(SU) find root.swork -name "*.gz" | xargs -n 20 sudo gunzip
-	find root.swork/lib/modules -type f -name "*.ko" | xargs $(SU) strip --strip-unneeded -g
-	#
-	KVER=`ls root.swork/lib/modules`; \
-		$(SU) chroot root.swork /sbin/depmod -a $$KVER
-	#
-	$(SU) cp -dr conf.dir/* root.swork
-	$(SU) find root.swork -name .svn | xargs $(SU) rm -rf
-	$(SU) mkdir -p root.swork/usr/share/doc/ppcrcd
-	$(SU) cp -r doc/* root.swork/usr/share/doc/ppcrcd
+		-i $@.work/boot.msg		\
+		-i $@.work/boot.msg.net
+	cp $(OUT)/root/boot/vmlinux-* $@.work/vmlinux
+	strip $@.work/vmlinux
+	strip -R.comment $@.work/vmlinux
+	gzip -9 $@.work/vmlinux
+	cp yaboot/yaboot $@.work
+	$(SU) cp initrd.sqf $@.work
+	mv $@{.work,}
+
+$(root_stripped):	$(root_installed) conf.dir doc
+	$(SU) rm -rf $@{,.work}
+	#
+	mkdir -p $@.work/dev
+	cd $@.work/dev && while read T M m N; do	\
+		$(SU) mknod $$N $$T $$M $$m;		\
+	done < $(PWD)/conf.dir/dev/devs
+	#
+	$(SU) cp -a $(root_installed)/* $@.work
+	#
+	while read TODEL; do $(SU) rm -rf $@.work/$$TODEL; done < todel
+	#
+	$(SU) find $@.work -type f | xargs file | grep ELF | \
+		grep "not stripped" | sed "s/:.*//" | xargs $(SU) strip
+	$(SU) find $@.work -name "*.gz" | xargs -n 20 sudo gunzip
+	find $@.work/lib/modules -type f -name "*.ko" | \
+		xargs $(SU) strip --strip-unneeded -g
+	#
+	KVER=`ls $@.work/lib/modules` && \
+		$(SU) chroot $@.work /sbin/depmod -a $$KVER
+	#
+	$(SU) cp -dr conf.dir/* $@.work
+	$(SU) find $@.work -name .svn | xargs $(SU) rm -rf
+	$(SU) mkdir -p $@.work/usr/share/doc/ppcrcd
+	$(SU) cp -r doc/* $@.work/usr/share/doc/ppcrcd
 	#
 	$(SU) sed -e 's/@_VERSION_@/$(VERSION)/g' \
-		-i root.swork/linuxrc
+		-i $@.work/linuxrc
 	$(SU) sed -e 's/pldmachine/ppcrcd/' \
-		-i root.swork/etc/sysconfig/network
+		-i $@.work/etc/sysconfig/network
 	#
-	$(SU) chown root -R root.swork/*
-	$(SU) mv root.swork $@
+	$(SU) chown root -R $@.work/* # XXX
+	$(SU) mv $@{.work,}
 
 
 yaboot/yaboot:	yaboot/yaboot.c yaboot/Makefile /usr/lib/libext2fs.a
 	make -C yaboot
 
-root.installed:	$(INSTALL) root.inst root-ok-deps
-	-$(SU) umount root.inst/proc
-	touch $@
+$(root_installed):	$(INSTALL) $(root_inst) $(touch)/root-ok-deps
+	-$(SU) umount $(root_inst)/proc
+	ln -sf $(root_inst) $@
 
-root-ok-deps:	$(INSTALL)
-	rpm -Va --nofiles --root=$(PWD)/root.inst
-	touch $@
+$(touch)/root-ok-deps:	$(INSTALL) $(root_inst)
+	rpm -Va --nofiles --root=$(root_inst)
+	@touch $@
 	
-root.inst:
-	mkdir root.inst
-	$(SU) rpm --root=$(PWD)/root.inst --initdb
-
-.%_installed:	.%_rpm root.inst
-	@$(SU) rpm -Uhv --root=$(PWD)/root.inst `cat $(@:.%_installed=.%_rpm)` $(INSTOPTS-$(@:.%_installed=%)) \
-		--define="_install_langs %{nil}"
+$(root_inst):
+	mkdir $@
+	$(SU) rpm --root=$@ --initdb
+
+installed_dir = $(OUT)/rpm/installed
+rpms_dir = $(OUT)/rpm/rpms
+
+$(installed_dir)/%:	$(rpms_dir)/% $(root_inst)
+	@$(SU) rpm -Uhv --root=$(root_inst) `cat $(firstword $^)`	\
+		$(INSTOPTS-$(notdir $@)) --define="_install_langs %{nil}"
 	@touch $@
 
-.%_rpm:		.%_prep
-	##############################################################################
-	###	Building $(@:.%_rpm=%)
-	##############################################################################
-	cd rpm/SPECS; ( rpmbuild -bb	\
-		--define="_topdir $(PWD)/rpm"	\
-		$(shell if [ -n "$(SPEC-$(@:.%_rpm=%))" ]; then echo $(SPEC-$(@:.%_rpm=%)); else echo $(@:.%_rpm=%).spec; fi)	\
-		$(BCOND-$(@:.%_rpm=%)) $(BCOND)	\
+$(R)/%:
+	@#XXX every package neads something like: $(R)/setup: $(P)/setup
+	#######################################################################
+	###	Building $(notdir $@)
+	#######################################################################
+	cd $(OUT)/rpm/SPECS && ( rpmbuild -bb	\
+		--define="_topdir $(OUT)/rpm"	\
+		$(firstword $^)			\
+		$(BCOND-$(notdir $@)) $(BCOND)	\
 		--define="rpmcflags $(CFLAGS)";	\
 		echo $$? > $(PWD)/EXIT) | tee $(PWD)/buildout;
 	[ `cat EXIT` == 0 ] || exit `cat EXIT`
 	for RPM in `sed -n '/^Wrote:/s/Wrote: // p' buildout`; do	\
-		echo $$RPM > .`echo $$RPM | sed -e 's-.*/--g' -e 's/-[^-]*-[^-]*$$//'`_rpm;	\
+		echo $$RPM > $(R)/`echo $$RPM |		\
+			sed -e 's at .*/@@g' -e 's/-[^-]*-[^-]*$$//'`;	\
 	done
 	rm buildout EXIT
 	touch $@
 
-.%_prep:	.%_pre
+$(P)/%:	$(sources)/%
 	touch $@
 
-
-.%_pre:		builder_prepared
-	##############################################################################
-	###	Getting $(@:.%_pre=%) source
-	##############################################################################
-	if [ "$(REV-$(@:.%_pre=%))" != "local" ]; then	\
-		rm -f rpm/SPECS/$(shell if [ -n "$(SPEC-$(@:.%_pre=%))" ]; then echo $(SPEC-$(@:.%_pre=%)); else echo $(@:.%_pre=%).spec; fi);	\
-		cd rpm/SPECS; ./builder -g		\
-			$(shell if [ -n "$(SPEC-$(@:.%_pre=%))" ]; then echo $(SPEC-$(@:.%_pre=%)); else echo $(@:.%_pre=%).spec; fi)	\
-			-r $(shell if [ -n "$(REV-$(@:.%_pre=%))" ]; then echo $(REV-$(@:.%_pre=%)); else echo $(REVISION); fi)		\
-			--define _topdir $(PWD)/rpm	\
-			$(BCOND-$(@:.%_pre=%)) $(BCOND);	\
-	fi
-	sed -e '/^%changelog/q' -i \
-		rpm/SPECS/$(shell if [ -n "$(SPEC-$(@:.%_pre=%))" ]; then echo $(SPEC-$(@:.%_pre=%)); else echo $(@:.%_pre=%).spec; fi)
+$(sources)/%:	$(OUT)/rpm/SPECS/%.spec
+	#######################################################################
+	###	Getting $(notdir $@) source
+	#######################################################################
+	cd rpm/SPECS && ./builder -g $(firstword $^)	\
+		$(if $(REV-$(notdir $@)),-r $(REV-$(notdir $@)),) \
+		--define _topdir $(OUT)/rpm	\
+		$(BCOND-$(notdir $@)) $(BCOND)		\
 	touch $@
 
-builder_prepared:
-	rm -rf rpm/SPECS
-	mkdir -p rpm/{SPECS,SOURCES,RPMS,SRPMS,BUILD}
-	cd rpm; cvs -d ":pserver:cvs at cvs.pld-linux.org:/cvsroot" get SPECS/builder SOURCES/kernel-ppc.config
-	sed -e '/SOURCE_DIR=/s@=.*$$@="$(PWD)/rpm/SOURCES"@'	\
-		-e '/SPECS_DIR=/s@=.*$$@="$(PWD)/rpm/SPECS"@'	\
-		-e '/rpmbuild --nodig/s at rpmbuild@rpmbuild --define="_topdir $(PWD)/rpm"@' \
-		-i rpm/SPECS/builder
+$(S)/%.spec: $(touch)/builder_prepared
+	cd $(dir $@) && cvs up $(if $(REV-$(@:$(S)/%.spec=%)),-r \
+		$(REV-$(@:$(S)/%.spec=%)),-A) $(notdir $@)
+
+$(touch)/builder_prepared:
+	rm -rf $(OUT)/rpm/SPECS
+	mkdir -p $(OUT)/rpm/{SPECS,SOURCES,RPMS,SRPMS,BUILD,rpms,sources,prep}
+	mkdir -p $(OUT)/{touch/stop,root,images}
+	cd $(OUT)/rpm && cvs -d ":pserver:cvs at cvs.pld-linux.org:/cvsroot" get \
+		SPECS/builder SOURCES/kernel-ppc.config
+	sed -e '/SOURCE_DIR=/s@=.*$$@="$(OUT)/rpm/SOURCES"@'	\
+		-e '/SPECS_DIR=/s@=.*$$@="$(OUT)/rpm/SPECS"@'	\
+		-e '/rpmbuild --nodig/s at rpmbuild@rpmbuild --define="_topdir $(OUT)/rpm"@' \
+		-i $(OUT)/rpm/SPECS/builder
 	touch $@
 
 info:
-	LANGUAGE= LANG= LC_ALL=C rpm --root=$(PWD)/root.inst -qa \
-		  --queryformat="<b>%{NAME}</b>(%{EPOCH}:%{VERSION}-%{RELEASE})ľ\t<i>%{SUMMARY}</i>\n" | sort | tr "ľ" "\n" > $@
+	LANGUAGE= LANG= LC_ALL=C rpm --root=$(root_inst) -qa \
+		--queryformat="<b>%{NAME}</b>(%{EPOCH}:%{VERSION}-%{RELEASE})ľ\t<i>%{SUMMARY}</i>\n" | sort | tr "ľ" "\n" > $@
 
-fix:
-	@if ls .*_pre > /dev/null 2>&1; then touch ./.*_pre; fi
-	@if ls .*_prep > /dev/null 2>&1; then touch ./.*_prep; fi
-	@if ls .*_rpm > /dev/null 2>&1; then touch ./.*_rpm; fi
-	@if ls .*_installed > /dev/null 2>&1; then touch ./.*_installed; fi
-	@echo "Fixed"
+#fix:
+#	@if ls .*_pre > /dev/null 2>&1; then touch ./.*_pre; fi
+#	@if ls .*_prep > /dev/null 2>&1; then touch ./.*_prep; fi
+#	@if ls .*_rpm > /dev/null 2>&1; then touch ./.*_rpm; fi
+#	@if ls .*_installed > /dev/null 2>&1; then touch ./.*_installed; fi
+#	@echo "Fixed"
 	
 clean:
-	@echo use one of: distclean clean-all clean-all clean-inst clean-root clean-img clean-yaboot
+	@echo use one of: distclean clean-all clean-inst clean-root clean-img clean-yaboot
 	
 distclean:	clean-all
 	rm -rf rpm builder_prepared
@@ -232,5 +262,5 @@
 
 .SECONDARY:
 
-.DELETE_ON_ERROR: ppcrcd.iso ppcrcd.sqf initrd.sqf
+.DELETE_ON_ERROR: $(ppcrcd_iso) $(ppcrcd_sqf) $(initrd_sqf)
 	

Modified: ppcrcd/trunk/base.pkgs
==============================================================================
--- ppcrcd/trunk/base.pkgs	(original)
+++ ppcrcd/trunk/base.pkgs	Fri Jan  6 21:23:03 2006
@@ -1,8 +1,10 @@
 
 I +=	setup
 # +ssp
+$(R)/setup:	$(P)/setup
 
 I +=	FHS
+$(R)/FHS:	$(P)/FHS
 
 I +=	virtual-mount-proc
 
@@ -10,6 +12,7 @@
 REV-basesystem = AC-branch
 # missing dev
 INSTOPTS-basesystem = --nodeps
+$(R)/basesystem:	$(P)/basesystem
 
 I +=	glibc glibc-misc iconv
 REV-glibc = DEVEL
@@ -18,117 +21,151 @@
 #-localedb -selinux
 INSTOPTS-glibc = --nodeps
 # glibc <-> glibc-misc
+$(addprefix $(R)/,glibc glibc-misc iconv):	$(P)/glibc
 
 I +=	libselinux
+$(R)/libselinux:	$(P)/libselinux
 
 I +=	pdksh
 BCOND-pdksh = --without static
 # -static
+$(R)/pdksh:	$(P)/pdksh
 
 I +=	attr
+$(R)/attr:	$(P)/attr
 
 I +=	acl
+$(R)/acl:	$(P)/acl
 
 I +=	mawk
+$(R)/mawk:	$(P)/mawk
 
 I +=	cracklib cracklib-dicts
 # +ssp
+$(R)/cracklib $(R)/cracklib-dicts:	$(P)/cracklib
 
 I +=	make
+$(R)/make:	$(P)/make
 
 I +=	db
 REV-db = AC-branch
 BCOND-db = --without tcl
 # +java -tcl +pmutex +nptl
+$(R)/db:	$(P)/db
 
 I +=	pam-libs pam
-SPEC-pam-libs = pam.spec
-BCOND-pam-libs = --without doc
+BCOND-pam = --without doc
 # +pwexport -cap -doc -opie +prelude -pwdb -selinux -skey -tcpd
+$(R)/pam $(R)/pam-libs:	$(P)/pam
 
 I +=	coreutils
 # -selinux
+$(R)/coreutils:	$(P)/coreutils
 
 I +=	perl-base
-SPEC-perl-base = perl.spec
-BCOND-perl-base = --without tests --without microperl
+BCOND-perl = --without tests --without microperl
 # -tests -threads -gdbm -microperl
+$(R)/perl-base:	$(P)/perl
 
 I +=	MAKEDEV
+$(R)/MAKEDEV:	$(P)/MAKEDEV
 
 I +=	udev
 BCOND-udev = --without initrd
 # -initrd
+$(R)/udev:	$(P)/udev
 
 I +=	libsepol
+$(R)/libsepol:	$(P)/libsepol
 
 I +=	device-mapper
 # -selinux
+$(R)/device-mapper:	$(P)/device-mapper
 
 I +=	shadow
 # -selinux +shared
+$(R)/shadow:	$(P)/shadow
 
 I +=	login
-SPEC-login = util-linux.spec
 # +uClibc
+$(addprefix $(R)/,util-linux losetup mount tunelp):	$(P)/util-linux
+$(addprefix $(R)/,login agetty rawdevices):	$(P)/util-linux
 
 I +=	mailx
+$(R)/mailx:	$(P)/mailx
 
 I +=	gettext
 BCOND-gettext = --without xemags --without dotnet
 # -asprintf -xemacs +gcj +javac -dotnet
+$(R)/gettext:	$(P)/gettext
 
 
 I +=	libuuid fsck libcom_err e2fsprogs
-SPEC-libuuid = e2fsprogs.spec
-BCOND-libuuid = --without static --without nls
+BCOND-e2fsprogs = --without static --without nls
 # +allstatic -static -nls
+$(addprefix $(R)/,e2fsprogs libcom_err libuuid fsck): $(P)/e2fsprogs
 
 I +=	mktemp
+$(R)/mktemp:	$(P)/mktemp
 
 I +=	grep
 # +pcre
+$(R)/grep:	$(P)/grep
 
 I +=	mingetty
+$(R)/mingetty:	$(P)/mingetty
 
 I +=	popt
+$(R)/popt:	$(P)/popt
 
 I +=	ncurses
 BCOND-ncurses = --without ada --without cxx
 # -ada -cxx
+$(R)/ncurses:	$(P)/ncurses
 
 I +=	psmisc
 # -selinux
+$(R)/psmisc:	$(P)/psmisc
 
 I +=	glib2
 BCOND-glib2 = --without apidocs
 #-apidocs -static_libs
+$(R)/glib2:	$(P)/glib2
 
 I +=	procps
+$(R)/procps:	$(P)/procps
 
 I +=	findutils
 # -selinux
+$(R)/findutils:	$(P)/findutils
 
 I +=	iproute2
 BCOND-iproute2 = --without doc
 # -doc -tc -atm +uClibc
+$(R)/iproute2:	$(P)/iproute2
 
 I +=	zlib
 # -asmopt +pax
+$(R)/zlib:	$(P)/zlib
 
 I +=	libgpg-error
+$(R)/libgpg-error:	$(P)/libgpg-error
 
 I +=	libgcrypt
+$(R)/libgcrypt:	$(P)/libgcrypt
 
 I +=	cryptsetup
 BCOND-cryptsetup = --without initrd
+$(R)/cryptsetup:	$(P)/cryptsetup
 
 I +=	mount
+$(R)/mount:	$(P)/mount
 
 I +=	module-init-tools
+$(R)/module-init-tools:	$(P)/module-init-tools
 
 I +=	net-tools
-
+$(R)/net-tools:	$(P)/net-tools
 
 I +=	rc-scripts
 BCOND-rc-scripts = --without static
@@ -138,34 +175,41 @@
 # 2. -> utempter -> SysVinit ^
 # 3. -> util-linux -> chkconfig -> rc-scripts
 INSTOPTS-rc-scripts = --nodeps
+$(R)/rc-scripts:	$(P)/rc-scripts
 
 I +=	chkconfig
 # +mr
+$(R)/chkconfig:	$(P)/chkconfig
 
 I +=	util-linux
 
 I +=	vixie-cron
 # -selinux
 S +=	crond
+$(R)/vixie-cron:	$(P)/vixie-cron
 
 I +=	logrotate
 # -selinux
+$(R)/logrotate:	$(P)/logrotate
 
 I +=	SysVinit
 BCOND-SysVinit = --with preconfigured
 # +preconfigured -slinux
+$(R)/SysVinit:	$(P)/SysVinit
 
 I +=	utempter
+$(R)/utempter:	$(P)/utempter
 
 #I +=	hotplug     XXX
 
 I +=	readline
-#REV-readline = HEAD
+$(R)/readline:	$(P)/readline
 
 I +=	bash
 REV-bash = HEAD
 BCOND-bash = --without static
 # -static +bash_history
+$(R)/bash:	$(P)/bash
 
 I +=	losetup rawdevices agetty tunelp
 S +=	rawdevices
@@ -173,102 +217,119 @@
 I +=	sed
 #BCOND-sed = --without tests
 # -tests
+$(R)/sed:	$(P)/sed
 
 I +=	libusb
+$(R)/libusb:	$(P)/libusb
 
 I +=	usbutils
-
+$(R)/usbutils:	$(P)/usbutils
 
 I +=	hfsutils
+$(R)/hfsutils:	$(P)/hfsutils
 
 I +=	pmac-utils
-
-
-
+$(R)/pmac-utils:	$(P)/pmac-utils
 
 I +=	busybox-initrd
-SPEC-busybox-initrd = busybox.spec
 #prep
-BCOND-busybox-initrd = --without static --without glibc
+BCOND-busybox = --without static --without glibc
 # +altconfig +lnkfl +fileutl_prov +grep_prov +sh_prov -static -initrd +dietlibc +glibc
+$(R)/busybox-initrd: $(P)/busybox
 
 I +=	pci-database
+$(R)/pci-database:	$(P)/pci-database
 
 I +=	tar
+$(R)/tar:	$(P)/tar
 
 I +=	gzip
+$(R)/gzip:	$(P)/gzip
 
 I +=	genromfs
+$(R)/genromfs:	$(P)/genromfs
 
 I +=	mdadm-initrd mdadm
-SPEC-mdadm-initrd = mdadm.spec
 # -initrd -uClibc
 S +=	mdadm
+$(R)/mdadm $(R)/mdadm-initrd: $(P)/mdadm
 
 I +=	geninitrd
+$(R)/geninitrd:	$(P)/geninitrd
 
 I +=	gawk
+$(R)/gawk:	$(P)/gawk
 
 I +=	modutils
 BCOND-modutils = --without static
 # -warning -static -linux25
+$(R)/modutils:	$(P)/modutils
 
 I +=	pciutils
+$(R)/pciutils:	$(P)/pciutils
 
 I +=	hdparm
+$(R)/hdparm:	$(P)/hdparm
 
 I +=	sdparm
+$(R)/sdparm:	$(P)/sdparm
 
 I +=	open
+$(R)/open:	$(P)/open
 
 I +=	kbd
+$(R)/kbd:	$(P)/kbd
 
 I +=	yaboot
+$(R)/yaboot:	$(P)/yaboot
 
 I +=	kernel-grsecurity kernel-grsecurity-pcmcia
-SPEC-kernel-grsecurity = kernel.spec
-REV-kernel-grsecurity = LINUX_2_6_14
+REV-kernel = LINUX_2_6_14
 #prep
-BCOND-kernel-grsecurity = --without smp --with grsecurity
+BCOND-kernel = --without smp --with grsecurity
 # -smp -up -source -pcmcia -grsecurity -pld_vers
 # +grsec_basic +pax +omosix +vserver +verbose +preemptive
 # +regparm +em8300 +xen0 +xenU +xendev +abi
+$(R)/kernel-grsecurity $(R)/kernel-grsecurity-pcmcia: $(P)/kernel
 
 REV-gcc = GCC_4_1
 BCOND-gcc = --without ada --without fortran --without java --without objc --without objcxx
 #-ada -fortran -java -objc -objcxx +multilib +profiling -bootstrap +tests
 
-
-.module-init-tools_prep:	.module-init-tools_pre
-	sed -e '/BuildR/s/static/devel/' -i rpm/SPECS/module-init-tools.spec
-	sed -e "/^%patch2/ased -e 's/insmod.static//' -i Makefile.am" -i rpm/SPECS/module-init-tools.spec
-	sed -e "/^%patch2/ased -n -e '/insmod_static/!p' -i Makefile.am" -i rpm/SPECS/module-init-tools.spec
+$(P)/module-init-tools: $(sources)/module-init-tools
+	sed -e '/BuildR/s/static/devel/' \
+		-i $(OUT)/rpm/SPECS/module-init-tools.spec
+	sed -e "/^%patch2/ased -e 's/insmod.static//' -i Makefile.am" \
+		-i $(OUT)/rpm/SPECS/module-init-tools.spec
+	sed -e "/^%patch2/ased -n -e '/insmod_static/!p' -i Makefile.am" \
+		-i $(OUT)/rpm/SPECS/module-init-tools.spec
 	touch $@
 
-.kernel-grsecurity_prep:		.kernel-grsecurity_pre kernel.config
-	rm -f .kerneleq
-	cd rpm/SPECS; patch -p0 < ../../kernel.spec-patch
-	cp linux-squashfs2.2_lzma.patch rpm/SOURCES
-	cp kernel.config rpm/SOURCES/kernel-ppc.config
-	cp kernel.config rpm/SOURCES/kernel-ppc-smp.config
+$(P)/kernel: $(sources)/kernel
+	rm -f $(touch)/kerneleq
+	cd $(OUT)/rpm/SPECS && patch -p0 < $(PWD)/kernel.spec-patch
+	cp linux-squashfs2.2_lzma.patch $(OUT)/rpm/SOURCES
+	cp kernel.config $(OUT)/rpm/SOURCES/kernel-ppc.config
+	cp kernel.config $(OUT)/rpm/SOURCES/kernel-ppc-smp.config
 	touch $@
 
-.busybox-initrd_prep:	.busybox-initrd_pre
+$(P)/busybox: $(sources)/busybox
 	sed -e '/ifnarch/s/$$/ ppc/' \
-		-i rpm/SPECS/busybox.spec
+		-i $(OUT)/rpm/SPECS/busybox.spec
 	touch $@
 
-.kerneleq:
+$(touch)/kerneleq:
 	-$(SU) rpm --erase kernel-grsecurity-source
 	-$(SU) rpm --erase kernel-grsecurity-module-build
 	-$(SU) rpm --erase kernel-grsecurity-headers
 	-$(SU) rpm --erase kernel-source
 	-$(SU) rpm --erase kernel-module-build
 	-$(SU) rpm --erase kernel-headers
-	$(SU) rpm -Uhv `cat .kernel-grsecurity-{source,module-build,headers}_rpm`
+	$(SU) rpm -Uhv \
+		`cat $(R)/kernel-grsecurity-{source,module-build,headers}`
 	touch $@
 
-.virtual-mount-proc_installed:
+$(installed_dir)/virtual-mount-proc:
 	$(SU) mount -t proc none root.inst/proc
 	touch $@
 


More information about the pld-cvs-commit mailing list