forked from markfasheh/ocfs2-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocfs2-test: Add vendor information to the RPM build process.
This patch will add the Vendor scripts and spec files to build the ocfs2-test RPM. Signed-off-by: Marcos Matsunaga <[email protected]> Signed-off-by: Tristan Ye <[email protected]>
- Loading branch information
Marcos Matsunaga
authored and
Marcos Matsunaga
committed
Nov 12, 2008
1 parent
7166388
commit 50eb246
Showing
34 changed files
with
1,109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
# | ||
# This Makefile snippet is to be included in Makebo Makefiles that | ||
# use the mbvendor infrastructure | ||
# | ||
|
||
PKG_VERSION = $(shell $(TOPDIR)/svnrev.guess $(PACKAGE)) | ||
|
||
-include $(TOPDIR)/vendor/$(shell ./vendor.guess)/Vendor.make | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
list_vendors() | ||
{ | ||
ls -1 vendor | while read -r line | ||
do | ||
if [ "$line" = "common" ] | ||
then | ||
continue | ||
fi | ||
if [ ! -d "vendor/$line" ] | ||
then | ||
continue | ||
fi | ||
echo $line | ||
done | ||
|
||
# Make common last | ||
if [ -d "vendor/common" ] | ||
then | ||
echo "common" | ||
fi | ||
} | ||
|
||
list_vendors | while read -r v | ||
do | ||
if [ -x "vendor/${v}/vendor.guess" ] | ||
then | ||
if "vendor/${v}/vendor.guess" >/dev/null 2>&1 | ||
then | ||
echo "$v" | ||
fi | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TOPDIR = .. | ||
|
||
include $(TOPDIR)/Preamble.make | ||
|
||
SUBDIRS = common rhel5 sles10 rhel4 sles9 fc7 fc8 fc9 | ||
|
||
include $(TOPDIR)/Postamble.make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
TOPDIR = ../.. | ||
|
||
include $(TOPDIR)/Preamble.make | ||
|
||
# Depend on the substitution values | ||
$(SCRIPTS): $(TOPDIR)/Config.make | ||
|
||
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh | ||
rm -f $@ $@+ | ||
sed -e 's/@@VERSION@@/$(VERSION)/g' $@.sh >$@+ | ||
chmod +x $@+ | ||
mv $@+ $@ | ||
|
||
DIST_FILES = \ | ||
ocfs2-test.spec-generic.in \ | ||
Vendor.make | ||
|
||
include $(TOPDIR)/Postamble.make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Support files | ||
# | ||
|
||
# This Vendor.make expects TESTARCH and VENDOR_EXTENSION to be set by an | ||
# including Makefile. | ||
|
||
|
||
RPMBUILD = $(shell /usr/bin/which rpmbuild 2>/dev/null || /usr/bin/which rpm 2>/dev/null || echo /bin/false) | ||
RPM_TOPDIR = `pwd` | ||
|
||
ifndef VENDOR_EXTENSION | ||
VENDOR_EXTENSION = common | ||
endif | ||
|
||
$(TOPDIR)/ocfs2-test-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm: dist $(TOPDIR)/vendor/common/ocfs2-test.spec-generic | ||
sed -e 's,@@PKG_VERSION@@,'$(PKG_VERSION)',g' \ | ||
-e 's,@@VENDOR_EXTENSION@@,'$(VENDOR_EXTENSION)',g' \ | ||
-e 's,@@PYGTK_NAME@@,'$(PYGTK_NAME)',g' \ | ||
-e 's,@@PYVERSION@@,'$(PYVERSION)',g' \ | ||
-e 's,@@COMPILE_PY@@,'$(COMPILE_PY)',g' \ | ||
-e 's,@@CHKCONFIG_DEP@@,'$(CHKCONFIG_DEP)',g' \ | ||
< "$(TOPDIR)/vendor/common/ocfs2-test.spec-generic" \ | ||
> "$(TOPDIR)/vendor/common/ocfs2-test.spec" | ||
$(RPMBUILD) -bs --define "_sourcedir $(RPM_TOPDIR)" --define "_srcrpmdir $(RPM_TOPDIR)" "$(TOPDIR)/vendor/common/ocfs2-test.spec" | ||
rm "$(TOPDIR)/vendor/common/ocfs2-test.spec" | ||
|
||
srpm: $(TOPDIR)/ocfs2-test-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm | ||
|
||
rpm: srpm | ||
$(RPMBUILD) --rebuild $(TOOLSARCH) "ocfs2-test-$(DIST_VERSION)-$(PKG_VERSION).$(VENDOR_EXTENSION).src.rpm" | ||
|
Oops, something went wrong.