OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 13-Nov-2006 13:06:52 Branch: HEAD Handle: 2006111312065100 Added files: openpkg-src/libflaim libflaim.patch libflaim.spec Log: new package: libflaim 4.9.989 (FLAIM Database Engine) Summary: Revision Changes Path 1.1 +183 -0 openpkg-src/libflaim/libflaim.patch 1.1 +92 -0 openpkg-src/libflaim/libflaim.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/libflaim/libflaim.patch ============================================================================ $ cvs diff -u -r0 -r1.1 libflaim.patch --- /dev/null 2006-11-13 13:05:16 +0100 +++ libflaim.patch 2006-11-13 13:06:52 +0100 @@ -0,0 +1,183 @@ +Index: Makefile +--- Makefile.orig 2006-10-13 00:56:32 +0200 ++++ Makefile 2006-11-13 13:01:21 +0100 +@@ -134,17 +134,17 @@ + + ifndef host_os_family + ifeq (,$(OSTYPE)) +- ifneq (,$(RPM_OS)) +- OSTYPE = $(RPM_OS) +- endif +- endif +- +- ifeq (,$(OSTYPE)) + OSTYPE := $(shell uname -s) + endif + endif + + ifndef host_os_family ++ ifneq (,$(findstring FreeBSD,$(OSTYPE))) ++ host_os_family = freebsd ++ endif ++endif ++ ++ifndef host_os_family + ifneq (,$(findstring Linux,$(OSTYPE))) + host_os_family = linux + endif +@@ -244,6 +244,13 @@ + # -- Target operating system -- + + ifndef target_os_family ++ ifeq ($(host_os_family),freebsd) ++ unix_target = yes ++ target_os_family = freebsd ++ endif ++endif ++ ++ifndef target_os_family + ifeq ($(host_os_family),linux) + unix_target = yes + target_os_family = linux +@@ -1129,6 +1136,12 @@ + lib_link_libs = -lpthread + exe_link_libs = -lpthread + ++ ifeq ($(target_os_family),freebsd) ++ lib_link_libs += -lstdc++ -lncurses ++ exe_link_libs += -lstdc++ -lncurses ++ shared_link_flags += -shared -Wl,-Bsymbolic -fpic \ ++ -Wl,-soname,$(@F) -o $@ ++ endif + ifeq ($(target_os_family),linux) + lib_link_libs += -lrt -lstdc++ -ldl -lncurses + exe_link_libs += -lrt -lstdc++ -ldl -lncurses +@@ -1573,7 +1586,7 @@ + # -- Default target -- + + .PHONY : libs +-libs: status clean dircheck $(flaim_static_lib) $(flaim_shared_lib) ++libs: status clean dircheck $(flaim_static_lib) + + # -- *.cpp -> *$(obj_suffix) -- + +@@ -1871,25 +1884,12 @@ + .PHONY : install + install: libs pkgconfig + ifneq ($(host_os_family),win) +- $(ec)$(gprintf) "Installing ...\n" +- mkdir -p $(lib_install_dir)/pkgconfig +- mkdir -p $(include_install_dir) +- install --mode=644 $(flaim_shared_lib) $(lib_install_dir) +- install --mode=644 $(flaim_static_lib) $(lib_install_dir) +- install --mode=644 $(pkgconfig_file) $(pkgconfig_install_dir) +- install --mode=644 src/flaim.h $(include_install_dir) +- install --mode=644 $(ftk_src_dir)/ftk.h $(include_install_dir)/flaimtk.h +-ifneq ($(so_age),0) +-ifneq ($(so_revision),0) +- cd $(lib_install_dir); ln -fs $(lib_prefix)$(project_name).so.$(so_current).$(so_revision).$(so_age) $(lib_prefix)$(project_name).so.$(so_current).$(so_revision) +-endif +-endif +-ifneq ($(so_revision),0) +- cd $(lib_install_dir); ln -fs $(lib_prefix)$(project_name).so.$(so_current).$(so_revision) $(lib_prefix)$(project_name).so.$(so_current) +-endif +- cd $(lib_install_dir); ln -fs $(lib_prefix)$(project_name).so.$(so_current) $(lib_prefix)$(project_name).so +- -ldconfig $(lib_install_dir) +- $(ec)$(gprintf) "Installation complete.\n" ++ $(MKDIR) -p $(lib_install_dir)/pkgconfig ++ $(MKDIR) -p $(include_install_dir) ++ $(INSTALL) -c -m 644 $(flaim_static_lib) $(lib_install_dir) ++ $(INSTALL) -c -m 644 $(pkgconfig_file) $(pkgconfig_install_dir) ++ $(INSTALL) -c -m 644 src/flaim.h $(include_install_dir) ++ $(INSTALL) -c -m 644 $(ftk_src_dir)/ftk.h $(include_install_dir)/flaimtk.h + endif + + # -- uninstall -- +Index: ftk/src/ftk.h +--- ftk/src/ftk.h.orig 2006-10-13 00:56:32 +0200 ++++ ftk/src/ftk.h 2006-11-13 13:00:56 +0100 +@@ -39,6 +39,7 @@ + #undef FLM_NLM + #undef FLM_UNIX + #undef FLM_AIX ++ #undef FLM_FREEBSD + #undef FLM_LINUX + #undef FLM_SOLARIS + #undef FLM_HPUX +@@ -112,6 +113,19 @@ + #define FLM_UNIX + #define FLM_BIG_ENDIAN + #define FLM_STRICT_ALIGNMENT ++ #elif defined( __FreeBSD__) ++ #define FLM_FREEBSD ++ #define FLM_OSTYPE_STR "FreeBSD" ++ #define FLM_UNIX ++ #define FLM_STRICT_ALIGNMENT ++ #if defined( sparc) || defined( __sparc) || defined( __sparc__) ++ #define FLM_SPARC ++ #define FLM_BIG_ENDIAN ++ #elif defined( i386) || defined( _i386) ++ #define FLM_X86 ++ #endif ++ #define FLM_HAS_ASYNC_IO ++ #define FLM_HAS_DIRECT_IO + #elif defined( linux) + #define FLM_LINUX + #define FLM_OSTYPE_STR "Linux" +Index: ftk/src/ftkthrd.cpp +--- ftk/src/ftkthrd.cpp.orig 2006-10-13 00:56:32 +0200 ++++ ftk/src/ftkthrd.cpp 2006-11-13 13:00:56 +0100 +@@ -24,6 +24,7 @@ + //------------------------------------------------------------------------------ + + #include "ftksys.h" ++#include <signal.h> + + #ifdef FLM_UNIX + pid_t getpid( void); +Index: ftk/src/ftkunix.cpp +--- ftk/src/ftkunix.cpp.orig 2006-10-13 00:56:32 +0200 ++++ ftk/src/ftkunix.cpp 2006-11-13 13:00:56 +0100 +@@ -435,7 +435,11 @@ + + if( !m_bDoDirectIO || m_bFlushRequired) + { ++#ifdef FLM_FREEBSD ++ if( fsync( m_fd) != 0) ++#else + if( fdatasync( m_fd) != 0) ++#endif + { + return( f_mapPlatformError( errno, NE_FLM_FLUSHING_FILE)); + } +Index: src/flaimtk.h +--- src/flaimtk.h.orig 2006-10-13 00:56:32 +0200 ++++ src/flaimtk.h 2006-11-13 13:00:56 +0100 +@@ -39,6 +39,7 @@ + #undef FLM_NLM + #undef FLM_UNIX + #undef FLM_AIX ++ #undef FLM_FREEBSD + #undef FLM_LINUX + #undef FLM_SOLARIS + #undef FLM_HPUX +@@ -112,6 +113,19 @@ + #define FLM_UNIX + #define FLM_BIG_ENDIAN + #define FLM_STRICT_ALIGNMENT ++ #elif defined( __FreeBSD__) ++ #define FLM_FREEBSD ++ #define FLM_OSTYPE_STR "FreeBSD" ++ #define FLM_UNIX ++ #define FLM_STRICT_ALIGNMENT ++ #if defined( sparc) || defined( __sparc) || defined( __sparc__) ++ #define FLM_SPARC ++ #define FLM_BIG_ENDIAN ++ #elif defined( i386) || defined( _i386) ++ #define FLM_X86 ++ #endif ++ #define FLM_HAS_ASYNC_IO ++ #define FLM_HAS_DIRECT_IO + #elif defined( linux) + #define FLM_LINUX + #define FLM_OSTYPE_STR "Linux" @@ . patch -p0 <<'@@ .' Index: openpkg-src/libflaim/libflaim.spec ============================================================================ $ cvs diff -u -r0 -r1.1 libflaim.spec --- /dev/null 2006-11-13 13:05:16 +0100 +++ libflaim.spec 2006-11-13 13:06:52 +0100 @@ -0,0 +1,92 @@ +## +## libflaim.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/> +## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: libflaim +Summary: FLAIM Database Engine +URL: http://www.libflaim.org/ +Vendor: Novell +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Database +License: GPL +Version: 4.9.989 +Release: 20061113 + +# list of sources +Source0: http://forgeftp.novell.com/flaim/development/flaim/downloads/source/libflaim-%{version}.tar.gz +Patch0: libflaim.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes +PreReq: OpenPKG, openpkg >= 20040130 +AutoReq: no +AutoReqProv: no + +%description + FLAIM is an embeddable cross-platform database engine with a C++ + API that provides a rich, powerful, easy-to-use feature set. It is + the database engine used by Novell eDirectory. It has proven to be + highly scalable, reliable, and robust. + +%track + prog libflaim = { + version = %{version} + url = http://forge.novell.com/modules/xfmod/project/?flaim + regex = libflaim-(__VER__)\.tar\.gz + } + +%prep + %setup -q + %patch -p0 + +%build + %{l_make} %{l_mflags} \ + install_prefix=%{l_prefix} \ + usegcc release all + +%install + rm -rf $RPM_BUILD_ROOT + %{l_make} %{l_mflags} \ + install_prefix=$RPM_BUILD_ROOT%{l_prefix} \ + MKDIR="%{l_shtool} mkdir" \ + INSTALL="%{l_shtool} install" \ + install + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/bin + for util in checkdb dbshell rebuild view; do + %{l_shtool} install -c -s -m 755 \ + build/*/release/util/$util \ + $RPM_BUILD_ROOT%{l_prefix}/bin/flaim-$util + done + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org