Commit 454e1835 authored by Christian Mohrbacher's avatar Christian Mohrbacher Committed by Bernd Schubert

fhgfs-utils : changed specs and rules files to allow building for i686 target...

fhgfs-utils : changed specs and rules files to allow building for i686 target instead of i386 and to allow passing USER_CXXFLAGS and USER_LDFLAGS to rpm/deb build; fixed typo in Makefile

git-svn-id: https://svn.itwm.fhg.de/svn/fsdevel/projects@2128 06d474eb-e7fd-0310-b1d4-fdbe02cb80bc
parent 226b2d2c
......@@ -22,7 +22,9 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_ONLINE_CFG_PATH='__FHGFS_ONLINE_CFG_PATH__' \
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__'
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__'
touch build-stamp
......
%define release_str %RELEASE_STR%
%define ver %VER%
%define buildarch %BUILDARCH%
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_ONLINE_CFG_PATH %FHGFS_ONLINE_CFG_PATH%
......@@ -29,17 +30,17 @@
%define distver %(relpackage="`rpm -qf /etc/redhat-release`"; release="`rpm -q --queryformat='%{VERSION}' $relpackage 2> /dev/null | tr . : | sed s/:.*$//g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
%endif
%if %{defined disttag}
#%if %{defined disttag}
%define release %{release_str}.%{disttag}%{distver}
%else
%define release %{release_str}
%endif
#%else
#%define release %{release_str}
#%endif
#
# fhgfs-meta-data daemon creator
#
Summary: fhgfs utilities package
Summary: fhgfs meta-data daemon package
Name: %NAME%
Version: %{ver}
Release: %release
......@@ -49,6 +50,7 @@ Source: %NAME%-%{ver}-%{release_str}.tgz
URL: http://www.fhgfs.com
Vendor: Fraunhofer ITWM
BuildRoot: %{_tmppath}/%NAME%-root
BuildArch: %{buildarch}
requires: fhgfs-opentk-lib = %{ver}
%description
......
......@@ -13,7 +13,7 @@ FHGFS_VERSION="${VER}.${RELEASE_STR}.debian${DEBIAN_VERSION}"
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_ONLINE_CFG_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_online_cfg`}
FHGFS_FSCK_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_fsck`}
FHGFS_FSCK_PATH=${FHGFS_FSCK_PATH:-`readlink -f ../../fhgfs_fsck`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -30,6 +30,8 @@ sed \
-e "s#__FHGFS_FSCK_PATH__#$FHGFS_FSCK_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
-e "s/__USER_LDFLAGS__/$USER_LDFLAGS/g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
......
#!/bin/bash
set -e
NAME=fhgfs-utils
SPEC_FILE=${NAME}.spec
VER=${VER:-"2011.04"}
RELEASE_STR=${RELEASE_STR:-`date +%F|tr - .`.`date +%T| tr -d :`}
uname -m | grep x86_64 > /dev/null 2>&1
if [ $? -eq 0 ]
then
BUILDARCH="x86_64"
else
BUILDARCH="i686"
fi
set -e
pushd ../
TOOLS_ROOT=`pwd`
......@@ -33,6 +40,7 @@ sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
-e "s/%BUILDARCH%/$BUILDARCH/" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment