2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 09:01:46 +00:00

add homepage/url info and License file in grub2-xcat rpm package and deb package

Former-commit-id: 7fbb82797f18b1dc9cc8b2fe8a61bafe39507bad
This commit is contained in:
immarvin 2015-06-09 01:36:54 -04:00
parent a7aa386b29
commit 55e280a95e
2 changed files with 20 additions and 6 deletions

View File

@ -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>>>###@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@###<<<BUILD>>>###@snap'$$(date +"%Y%m%d%H%M")'@g' \
-e 's@###<<<GRUB2RELEASE>>>###@'$$(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 <xcat-user@lists.sourceforge.net> \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

View File

@ -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