Commit 4cbc0de0 authored by Sven Breuner's avatar Sven Breuner

client_devel: moved /usr/include/beegfs files to separate package beegfs_client_devel

previously these files were contained in the beegfs_utils package, where they
were conflicting with the same files in the fhgfs_utils package. thus, we now
have them in a separate package so that fhgfs_utils and beegfs_utils can be
intalled side-by-side on the same machine.
parent 21347d5e
# This is the beegfs_client_devel makefile.
#
# Use "make help" to find out about configuration options.
BEEGFS_COMMON_PATH ?= ../../beegfs_common/
BEEGFS_OPENTK_PATH ?= ../../beegfs_opentk_lib/
ifneq ($(BEEGFS_VERSION),)
BEEGFS_EXTRA_FLAGS += 'BEEGFS_VERSION="$(BEEGFS_VERSION)"'
endif
ifneq ($(BEEGFS_DEBUG),)
BEEGFS_EXTRA_FLAGS += 'BEEGFS_DEBUG=$(BEEGFS_DEBUG)'
endif
all:
clean:
rpm:
./make-rpm
deb:
./make-deb
help:
@echo 'Optional Arguments:'
@echo ' BEEGFS_DEBUG=1:'
@echo ' Enables debug information and symbols.'
@echo ' CXX=<compiler>:'
@echo ' Specifies a c++ compiler.'
@echo ' BEEGFS_OPENTK_PATH=<path>:'
@echo ' Path to the beegfs_opentk_lib directory.'
@echo ' BEEGFS_COMMON_PATH=<path>:'
@echo ' Path to the beegfs_common directory.'
@echo
@echo 'Targets:'
@echo ' all (default) - build only'
@echo ' rpm - create a rpm file and write it to buildroot/RPMS/'
@echo ' deb - create debian package file'
@echo ' help - print this help message'
# Include dependency files
ifneq ($(DEPENDENCY_FILES),)
include $(DEPENDENCY_FILES)
endif
%define release_str %RELEASE_STR%
%define ver %VER%
%define buildarch %BUILDARCH%
%define BEEGFS_OPENTK_PATH %BEEGFS_OPENTK_PATH%
%define BEEGFS_COMMON_PATH %BEEGFS_COMMON_PATH%
%define BEEGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
%if %is_mandrake
%define disttag mdk
%endif
%if %is_suse
%define disttag suse
%define distver %(relpackage="`rpm -qf /etc/SuSE-release`"; release="`rpm -q --queryformat='%{VERSION}' $relpackage 2> /dev/null | tr . : | sed s/:.*$//g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
%endif
%if %is_fedora
%define disttag fc
%endif
%if %is_redhat
%define disttag el
%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}
%define release %{disttag}%{distver}
%else
%define release generic
%endif
#
#
Summary: BeeGFS client devel files
Name: %NAME%
Version: %{ver}.%{release_str}
Release: %release
License: BeeGFS EULA
Group: Software/Other
Source: %NAME%-%{ver}-%{release_str}.tgz
URL: http://www.beegfs.com
Vendor: Fraunhofer ITWM
BuildRoot: %{_tmppath}/%NAME%-root
BuildArch: noarch
%description
This package contains BeeGFS client development files.
%prep
%setup -c
%build
#make BEEGFS_OPENTK_PATH=%{BEEGFS_OPENTK_PATH} \
# BEEGFS_COMMON_PATH=%{BEEGFS_COMMON_PATH} \
# BEEGFS_VERSION=%{BEEGFS_VERSION} \
# -C build/ -j4
%define debug_package %{nil}
%debug_package %{nil}
%install
cd build
echo "mkdir RPM_BUILD_ROOT (${RPM_BUILD_ROOT})"
mkdir -p ${RPM_BUILD_ROOT}/usr/include
cp -a ../include/beegfs ${RPM_BUILD_ROOT}/usr/include/
%post
%preun
%files
%defattr(-,root,root)
/usr/include/*
__NAME__ (__VER__.__RELEASE_STR__.debian__DEBIAN_VERSION__) stable; urgency=low
* initial native debian packaging
-- BeeGFS Maintainers <packages@beegfs.com> Wed, 16 Mar 2011 15:47:00 +0100
Source: beegfs-client-devel
Section: misc
Priority: optional
Maintainer: BeeGFS Maintainers <packages@beegfs.com>
Build-Depends: debhelper (>= 7.0.0), lsb-release
Standards-Version: 3.8.0
Package: beegfs-client-devel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: BeeGFS common files
This package contains BeeGFS client development files.
Files: *
Copyright: Fraunhofer ITWM
License: BeeGFS EULA
The complete text of this license can be found at
http://www.beegfs.com/docs/FraunhoferFS_EULA.txt
#!/usr/bin/make -f
DEB_BUILD_ROOT = debian/__NAME__
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# nothing to do for us
touch configure-stamp
build: build-stamp
build-stamp: $(QUILT_STAMPFN) configure-stamp
dh_testdir
# make BEEGFS_VERSION='__BEEGFS_VERSION__' \
# VER='__VER__' \
# RELEASE_STR='__RELEASE_STR__' \
# BEEGFS_COMMON_PATH='__BEEGFS_COMMON_PATH__' \
# BEEGFS_OPENTK_PATH='__BEEGFS_OPENTK_PATH__' \
# USER_CXXFLAGS='__USER_CXXFLAGS__' \
# USER_LDFLAGS='__USER_LDFLAGS__' \
# -j4
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# make BEEGFS_VERSION='__BEEGFS_VERSION__' \
# VER='__VER__' \
# RELEASE_STR='__RELEASE_STR__' \
# BEEGFS_COMMON_PATH='__BEEGFS_COMMON_PATH__' \
# BEEGFS_OPENTK_PATH='__BEEGFS_OPENTK_PATH__' \
# clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# manual installation
mkdir -p ${DEB_BUILD_ROOT}/usr/include
cp -a ../include/beegfs ${DEB_BUILD_ROOT}/usr/include/
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_lintian
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
#!/bin/bash
set -e
NAME="beegfs-client-devel"
source ../../beegfs-version
BEEGFS_OPENTK_PATH=${BEEGFS_OPENTK_PATH:-`readlink -f ../../beegfs_opentk_lib`}
BEEGFS_COMMON_PATH=${BEEGFS_COMMON_PATH:-`readlink -f ../../beegfs_common`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/g" \
-e "s/__VER__/$VER/" \
-e "s/__RELEASE_STR__/$RELEASE_STR/" \
-e "s/__DEBIAN_VERSION__/$DEBIAN_VERSION/g" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s#__BEEGFS_COMMON_PATH__#$BEEGFS_COMMON_PATH#g" \
-e "s#__BEEGFS_OPENTK_PATH__#$BEEGFS_OPENTK_PATH#g" \
-e "s/__BEEGFS_VERSION__/$BEEGFS_VERSION/g" \
-e "s/__VER__/$VER/g" \
-e "s/__RELEASE_STR__/$RELEASE_STR/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
#cp debian/package.lintian-overrides.in debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/g" debian/${NAME}.lintian-overrides
# build the package and supress lintian warnings. Lintian in Lenny cannot
# do that itself yet
# NOTE: package not signed yet! (-us -uc)
debuild -us -uc 2>&1 | egrep -v "dir-or-file-in-opt | file-in-unusual-dir"
debuild clean
if [ -z "$DEBIAN_ARCHIVE_DIR" ]; then
DEBIAN_ARCHIVE_DIR=`mktemp -d /tmp/debian_archive.XXXXXXXXX`
fi
mv ../*.build ../*.changes ../*.deb ../*.dsc ../*.tar.gz $DEBIAN_ARCHIVE_DIR/
echo "Wrote package files to $DEBIAN_ARCHIVE_DIR"
#!/bin/bash
NAME=beegfs-client-devel
SPEC_FILE=${NAME}.spec
source ../../beegfs-version
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`
popd
BUILD="${TOOLS_ROOT}/build"
mkdir -p $BUILD/buildroot/{BUILD,RPMS,S{RPMS,PECS,OURCES}}
rm -f $BUILD/buildroot/SOURCES/*.tgz
BEEGFS_OPENTK_PATH=${BEEGFS_OPENTK_PATH:-`readlink -f ../../beegfs_opentk_lib`}
BEEGFS_COMMON_PATH=${BEEGFS_COMMON_PATH:-`readlink -f ../../beegfs_common`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%BEEGFS_OPENTK_PATH%#$BEEGFS_OPENTK_PATH#" \
-e "s#%BEEGFS_COMMON_PATH%#$BEEGFS_COMMON_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}"
popd
rm -fr /var/tmp/${NAME}-root/
rm -f /var/tmp/rpm-tmp.*
......@@ -9,7 +9,7 @@ MAJOR_VER=`${dir}/../beegfs-version --print_major_version`
RELEASE_STR=`${dir}/../beegfs-version --print_release_version`
packages="beegfs_helperd beegfs_meta beegfs_mgmtd beegfs_storage beegfs_utils \
beegfs_common_package"
beegfs_common_package beegfs_client_devel"
client_packages="beegfs_client_module"
admon_package="beegfs_admon"
......
......@@ -6,7 +6,7 @@ LIB_NAME = jbeegfs
JAR_NAME = jbeegfs
SOURCEDIR = ../source
BEEGFS_INCLUDE = ../../beegfs_utils/include/
BEEGFS_INCLUDE = ../../beegfs_client_devel/include/
SOURCES = $(shell find $(SOURCEDIR)/ -name '*.java')
......
......@@ -7,7 +7,7 @@ BEEGFS_VERSION_PATH ?= ../../beegfs-version
BEEGFS_COMMON_PATH ?= ../../beegfs_common/
BEEGFS_OPENTK_PATH ?= ../../beegfs_opentk_lib/
BEEGFS_THIRDPARTY_PATH ?= ../../beegfs_thirdparty/
BEEGFS_DEVEL_INCLUDE_PATH ?= ../../beegfs_utils/include
BEEGFS_DEVEL_INCLUDE_PATH ?= ../../beegfs_client_devel/include
BEEGFS_AUTO_CXX11_SCRIPT_PATH ?= $(BEEGFS_COMMON_PATH)/build/check-cxx-for-c++11.sh
CPPUNIT_INC_PATH ?= $(BEEGFS_THIRDPARTY_PATH)/source/cppunit_install/usr/local/include
......
......@@ -58,7 +58,7 @@ BuildArch: %{buildarch}
requires: beegfs-opentk-lib = %{ver}.%{release_str}, beegfs-common = %{ver}.%{release_str}
%description
The package contains BeeGFS utils.
This package contains BeeGFS utilities.
%if %{NEED_DEBUG_DEFINE}
......@@ -98,8 +98,6 @@ mkdir -p ${RPM_BUILD_ROOT}/opt/beegfs/scripts/lib
cp ../scripts/lib/* ${RPM_BUILD_ROOT}/opt/beegfs/scripts/lib/
mkdir -p ${RPM_BUILD_ROOT}/opt/beegfs/lib
cp libjbeegfs.so jbeegfs.jar ${RPM_BUILD_ROOT}/opt/beegfs/lib/
mkdir -p ${RPM_BUILD_ROOT}/usr/include
cp -a ../include/beegfs ${RPM_BUILD_ROOT}/usr/include/
mkdir -p ${RPM_BUILD_ROOT}/etc/bash_completion.d
cp -a ../scripts/etc/bash_completion.d/beegfs-ctl ${RPM_BUILD_ROOT}/etc/bash_completion.d/
......@@ -117,6 +115,5 @@ cp -a ../scripts/etc/bash_completion.d/beegfs-ctl ${RPM_BUILD_ROOT}/etc/bash_com
/opt/beegfs/lib/libjbeegfs.so
/opt/beegfs/scripts/*
/usr/bin/*
/usr/include/*
/etc/bash_completion.d/*
/sbin/fsck.beegfs
......@@ -9,7 +9,7 @@ Package: beegfs-utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, beegfs-opentk-lib (= __VER__.__RELEASE_STR__.debian__DEBIAN_VERSION__), beegfs-common (= __VER__.__RELEASE_STR__.debian__DEBIAN_VERSION__)
Description: BeeGFS utils
The package contains BeeGFS utilities.
This package contains BeeGFS utilities.
Package: beegfs-utils-dbg
......
......@@ -73,8 +73,6 @@ install: build
cp ../scripts/lib/* ${DEB_BUILD_ROOT}/opt/beegfs/scripts/lib/
mkdir -p ${DEB_BUILD_ROOT}/opt/beegfs/lib
cp libjbeegfs.so jbeegfs.jar ${DEB_BUILD_ROOT}/opt/beegfs/lib/
mkdir -p ${DEB_BUILD_ROOT}/usr/include
cp -a ../include/beegfs ${DEB_BUILD_ROOT}/usr/include/
mkdir -p ${DEB_BUILD_ROOT}/etc/bash_completion.d
cp -a ../scripts/etc/bash_completion.d/beegfs-ctl ${DEB_BUILD_ROOT}/etc/bash_completion.d/
......
......@@ -30,7 +30,7 @@ sed \
-e "s#__BEEGFS_OPENTK_PATH__#$BEEGFS_OPENTK_PATH#g" \
-e "s#__BEEGFS_THIRDPARTY_PATH__#$BEEGFS_THIRDPARTY_PATH#g" \
-e "s#__BEEGFS_ONLINE_CFG_PATH__#$BEEGFS_ONLINE_CFG_PATH#g" \
-e "s#__BEEGFS_FSCK_PATH__#$BEEGFS_FSCK_PATH#g" \
-e "s#__BEEGFS_FSCK_PATH__#$BEEGFS_FSCK_PATH#g" \
-e "s/__BEEGFS_VERSION__/$BEEGFS_VERSION/g" \
-e "s/__VER__/$VER/g" \
-e "s/__RELEASE_STR__/$RELEASE_STR/g" \
......
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