diff --git a/grub2-xcat.recompile/Makefile b/grub2-xcat.recompile/Makefile index 66dafa7..66772eb 100644 --- a/grub2-xcat.recompile/Makefile +++ b/grub2-xcat.recompile/Makefile @@ -28,16 +28,19 @@ timestamp.grub2.mknetdir: timestamp.extract mkdir -p grub2-xcat/tftpboot grub2-mknetdir --directory=grub2/usr/lib/grub/powerpc-ieee1275 \ --net-directory=grub2-xcat/tftpboot + mkdir -p grub2-xcat/usr/share/doc/grub2-xcat/ + cp -f grub2/usr/share/doc/grub2-2.02/COPYING grub2-xcat/usr/share/doc/grub2-xcat/COPYING touch timestamp.grub2.mknetdir #grub2-xcat.spec: $(SPEC_TEMPLATE) $(BUILD_NUMBER_FILE) timestamp.grub2.mknetdir grub2-xcat.spec: $(SPEC_TEMPLATE) timestamp.grub2.mknetdir umask 0022 ( cd grub2-xcat ; find tftpboot -type d -exec echo '%dir "/{}"' ';' ) >filelist + ( cd grub2-xcat ; find 'usr/share/doc/grub2-xcat' -type d -exec echo '%dir "/{}"' ';' ) >>filelist ( cd grub2-xcat ; find tftpboot -type f -exec echo '"/{}"' ';' ) >>filelist - #cat $(SPEC_TEMPLATE) | sed -e \ - # 's@###<<>>###@build'$$(cat $(BUILD_NUMBER_FILE))'.xcat@g' \ - # -e '/%files/ r filelist' >$@ + ( cd grub2-xcat ; find 'usr/share/doc/grub2-xcat' -type f -exec echo '"/{}"' ';' ) >>filelist + + cat $(SPEC_TEMPLATE) | sed -e \ 's@###<<>>###@snap'$$(date +"%Y%m%d%H%M")'@g' \ -e 's@###<<>>###@'$$(rpm -qpf --qf "%{RELEASE}" $(SRC_RPM) )'@g' \ @@ -57,9 +60,18 @@ grub2-xcat.noarch.rpm: grub2-xcat.spec timestamp.grub2.mknetdir rpmbuild.out.2) grub2-xcat.noarch.rpm grub2-xcat.all.deb: grub2-xcat.noarch.rpm - alien -d -c -k $^ 2>&1 | tee alien.out - cp -f $$(awk '/grub2-xcat_.*_all.deb generated/ { print $$1 }' \ - alien.out) grub2-xcat.all.deb + LANG=C alien -d -c -k -g $^ 2>&1 | tee alien.out + (DEBSRC=$$(awk '/Directories .* prepared/ { print $$2 }' ./alien.out); \ + if [ -z "$$DEBSRC" ]; \ + then DEBSRC=$$(awk -F"'" '/cannot create directory .* File exists/ { print $$2 }' ./alien.out); \ + fi; \ + mv $$DEBSRC grub2-xcat-deb; \ + mv $$DEBSRC.orig grub2-xcat-deb.orig;\ + sed -i -e 's!Homepage:.*!!' \ + -e 's!Maintainer:.*!Maintainer:xCAT \nHomepage:http://xcat.sourceforge.net/!' grub2-xcat-deb/debian/control; \ + cd grub2-xcat-deb; \ + debian/rules binary) + #$(BUILD_NUMBER_FILE): $(SPEC_TEMPLATE) $(BINARY_RPM) # @if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi @@ -73,6 +85,7 @@ clean: $(RM) -r grub2-xcat-repack rpmbuild.out.2 $(RM) grub2-xcat-*.noarch.rpm grub2-xcat.noarch.rpm $(RM) alien.out + $(RM) -r grub2-xcat-deb grub2-xcat-deb.orig $(RM) grub2-xcat_*_all.deb grub2-xcat.all.deb .PHONY: build clean deb rpm diff --git a/grub2-xcat.recompile/grub2-xcat.spec.template b/grub2-xcat.recompile/grub2-xcat.spec.template index d63f85b..0127938 100644 --- a/grub2-xcat.recompile/grub2-xcat.spec.template +++ b/grub2-xcat.recompile/grub2-xcat.spec.template @@ -8,6 +8,7 @@ Distribution: Slackware/tarball Group: Applications/System Packager: IBM Corp. Vendor: IBM Corp. +URL:http://www.gnu.org/software/grub/ %define _rpmdir ../ %define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm