mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 17:11:45 +00:00
use cp instead of ln during packaging;add more package info to the grub2-xcat rpm
Former-commit-id: 918a3e2a1ea5954b589c003bc56d912f7a215473
This commit is contained in:
parent
e536c7d2bb
commit
a7aa386b29
@ -5,7 +5,7 @@
|
||||
SRC_RPM = grub2-2.02-0.16.ael7b.src.rpm
|
||||
SPEC_TEMPLATE = grub2-xcat.spec.template
|
||||
|
||||
BUILD_NUMBER_FILE = build-number.txt
|
||||
#BUILD_NUMBER_FILE = build-number.txt
|
||||
|
||||
build: rpm
|
||||
|
||||
@ -14,7 +14,7 @@ deb: grub2-xcat.all.deb
|
||||
|
||||
grub2.ppc64.rpm: $(SRC_RPM)
|
||||
rpmbuild --rebuild $^ 2>&1 | tee rpmbuild.out
|
||||
ln -sf $$(awk '/Wrote: .*\/grub2-[0-9].*\.rpm/ { print $$NF }' rpmbuild.out) \
|
||||
cp -f $$(awk '/Wrote: .*\/grub2-[0-9].*\.rpm/ { print $$NF }' rpmbuild.out) \
|
||||
grub2.ppc64.rpm
|
||||
|
||||
timestamp.extract: grub2.ppc64.rpm
|
||||
@ -30,7 +30,8 @@ timestamp.grub2.mknetdir: timestamp.extract
|
||||
--net-directory=grub2-xcat/tftpboot
|
||||
touch timestamp.grub2.mknetdir
|
||||
|
||||
grub2-xcat.spec: $(SPEC_TEMPLATE) $(BUILD_NUMBER_FILE) 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 tftpboot -type f -exec echo '"/{}"' ';' ) >>filelist
|
||||
@ -38,9 +39,11 @@ grub2-xcat.spec: $(SPEC_TEMPLATE) $(BUILD_NUMBER_FILE) timestamp.grub2.mknetdir
|
||||
# 's@###<<<BUILD>>>###@build'$$(cat $(BUILD_NUMBER_FILE))'.xcat@g' \
|
||||
# -e '/%files/ r filelist' >$@
|
||||
cat $(SPEC_TEMPLATE) | sed -e \
|
||||
's@###<<<BUILD>>>###@build'$$(date +"%Y%m%d%H%M")'@g' \
|
||||
's@###<<<BUILD>>>###@snap'$$(date +"%Y%m%d%H%M")'@g' \
|
||||
-e 's@###<<<GRUB2RELEASE>>>###@'$$(rpm -qpf --qf "%{RELEASE}" $(SRC_RPM) )'@g' \
|
||||
-e 's@###<<<GRUB2VERSION>>>###@'$$(rpm -qpf --qf "%{VERSION}" $(SRC_RPM) )'@g' \
|
||||
-e 's@###<<<SRCRPM>>>###@'$$(echo $(SRC_RPM))'@g' \
|
||||
-e 's@###<<<GITHASH>>>###@'$$(git log --pretty=%h -1 ./)'@g' \
|
||||
-e '/%files/ r filelist' >$@
|
||||
$(RM) filelist
|
||||
|
||||
@ -50,17 +53,17 @@ grub2-xcat.noarch.rpm: grub2-xcat.spec timestamp.grub2.mknetdir
|
||||
( cd grub2-xcat ; tar cf - . ) | ( cd grub2-xcat-repack ; tar xf - )
|
||||
( cd grub2-xcat-repack ; rpmbuild -bb ../grub2-xcat.spec --buildroot=`pwd` ) 2>&1 | \
|
||||
tee rpmbuild.out.2
|
||||
ln -sf $$(awk -F '/' '/Wrote: .*\/grub2-xcat-[0-9].*\.rpm/ { print $$NF }' \
|
||||
cp -f $$(awk -F '/' '/Wrote: .*\/grub2-xcat-[0-9].*\.rpm/ { print $$NF }' \
|
||||
rpmbuild.out.2) grub2-xcat.noarch.rpm
|
||||
|
||||
grub2-xcat.all.deb: grub2-xcat.noarch.rpm
|
||||
alien -d -c -k $^ 2>&1 | tee alien.out
|
||||
ln -sf $$(awk '/grub2-xcat_.*_all.deb generated/ { print $$1 }' \
|
||||
cp -f $$(awk '/grub2-xcat_.*_all.deb generated/ { print $$1 }' \
|
||||
alien.out) grub2-xcat.all.deb
|
||||
|
||||
$(BUILD_NUMBER_FILE): $(SPEC_TEMPLATE) $(BINARY_RPM)
|
||||
@if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi
|
||||
@echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE)
|
||||
#$(BUILD_NUMBER_FILE): $(SPEC_TEMPLATE) $(BINARY_RPM)
|
||||
# @if ! test -f $(BUILD_NUMBER_FILE); then echo 0 > $(BUILD_NUMBER_FILE); fi
|
||||
# @echo $$(($$(cat $(BUILD_NUMBER_FILE)) + 1)) > $(BUILD_NUMBER_FILE)
|
||||
|
||||
clean:
|
||||
$(RM) rpmbuild.out grub2.ppc64.rpm
|
||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
BuildArch: noarch
|
||||
Name: grub2-xcat
|
||||
Version: 2.02
|
||||
Release: 0.16.###<<<BUILD>>>###
|
||||
Version: ###<<<GRUB2VERSION>>>###
|
||||
Release: ###<<<GRUB2RELEASE>>>###.###<<<BUILD>>>###
|
||||
Summary: grub2 resources generated by grub2-mknetdir
|
||||
License: GPLv3+
|
||||
Distribution: Slackware/tarball
|
||||
@ -15,6 +15,7 @@ Vendor: IBM Corp.
|
||||
|
||||
%description
|
||||
grub2-xcat provides some grub2 resources generated by grub2-mknetdir,including grub2 modules and grub2 image.
|
||||
The grub2 resource is built based on ###<<<SRCRPM>>>### with grub2-xcat(git hash:###<<<GITHASH>>>###) in xcat-dep
|
||||
|
||||
%files
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user