diff --git a/README b/README index 14d2696..2a88159 100644 --- a/README +++ b/README @@ -9,7 +9,7 @@ Contents -------- 1. Project Hierarchy 2. Autotools Build -3. Windows Build +3. Building RPMs Project Hierarchy ----------------- @@ -80,5 +80,37 @@ Once you know the options you wish to use, you may use them all on the flaim-projects configure script command line. Those not understood by any given script will simply be ignored. +Building RPMs +------------- + +The FLAIM build system provides two custom targets, rpms and srcrpm. These +targets can be used to build RPM packages for RPM-based Linux distributions. + +To use these targets, you'll need to be building on an RPM-based platform, +and you'll need to have the platform's package-manager build package installed. +Most development systems have this package installed by default. + +If you plan to build RPM's please be aware that the RPM make target (rpms) is +not quite as automatic as we'd like it to be - however, it's close. The only +problem you're likely to notice is that you must have the flaim toolkit packages +(flaimtk and flaimtk-devel) installed as RPM packages before you can build the +flaim, xflaim and sqlflaim RPM packages. As long as the flaimtk ABI doesn't +change too dramatically, you can continue to build against these installed +packages for future builds (although, you'll probably want to update your +installed flaimtk packages at reasonable intervals as they are improved). + +The easiest way to make this work for you is to configure the ftk directory in +your build tree and then (also from within the ftk directory) type: + + $ make rpms + ... + $ sudo rpm -Uvh flaimtk*.rpm + ... + +At this point you will be able to make the rpms target from the top-level +umbrella project directory, if you wish. Or you may build each individual rpm +package (flaim, xflaim, or sqlflaim) from within their respective project +directories. + Enjoy! diff --git a/flaim/obs/flaim.spec.in b/flaim/obs/flaim.spec.in index 687a3ae..a17b7ed 100644 --- a/flaim/obs/flaim.spec.in +++ b/flaim/obs/flaim.spec.in @@ -1,6 +1,6 @@ Name: @PACKAGE_TARNAME@ -BuildRequires: gcc-c++ libstdc++-devel doxygen -Requires: libstdc++ +BuildRequires: gcc-c++ libstdc++-devel flaimtk-devel doxygen +Requires: libstdc++ flaimtk Summary: FLAIM is a database library. URL: http://forge.novell.com/modules/xfmod/project/?flaim Version: @PACKAGE_VERSION@ @@ -33,17 +33,15 @@ FLAIM is a database library. %configure make +%check +make check + %install -rm -rf ${RPM_BUILD_ROOT} -make DESTDIR=${RPM_BUILD_ROOT} install -if test -f ${RPM_BUILD_ROOT}/usr/include/flaimtk.h; then - rm ${RPM_BUILD_ROOT}/usr/include/flaimtk.h - rm ${RPM_BUILD_ROOT}/usr/lib64/libflaimtk.* - rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/ftk -fi +make DESTDIR=%{buildroot} install +rm -rf %{buildroot}%{_datadir}/doc/%{name}/html %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf %{buildroot} %files %defattr(-,root,root) @@ -62,12 +60,12 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libflaim.so* %{_bindir}/flmcheckdb %{_bindir}/flmrebuild -%{_bindir}/flmsample %{_bindir}/flmview %{_bindir}/flmdbshell %{_bindir}/flmgigatest %files devel +%{_libdir}/pkgconfig/libflaim.pc %{_libdir}/libflaim.a %{_includedir}/flaim.h diff --git a/flaim/sample/Makefile.am b/flaim/sample/Makefile.am index ceb23f7..2b674d6 100644 --- a/flaim/sample/Makefile.am +++ b/flaim/sample/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS = sample +noinst_PROGRAMS = sample FLAIM_INC=-I$(top_srcdir)/src FLAIM_LIB=../src/libflaim.la diff --git a/ftk/configure.ac b/ftk/configure.ac index 4d62e98..c297927 100644 --- a/ftk/configure.ac +++ b/ftk/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.62]) -AC_INIT([FTK], [1.2], [flaim-users@forge.novell.com]) +AC_INIT([FLAIMTK], [1.2], [flaim-users@forge.novell.com]) AM_INIT_AUTOMAKE([-Wall -Werror]) LT_PREREQ([2.2]) LT_INIT([dlopen]) @@ -138,7 +138,7 @@ esac AC_CONFIG_FILES([Makefile docs/Makefile obs/Makefile - obs/ftk.spec + obs/flaimtk.spec src/Makefile util/Makefile libflaimtk.pc]) diff --git a/ftk/docs/Makefile.am b/ftk/docs/Makefile.am index 4b2c607..76506ad 100644 --- a/ftk/docs/Makefile.am +++ b/ftk/docs/Makefile.am @@ -8,7 +8,7 @@ $(docpkg): doxygen.stamp doxygen.stamp: doxyfile $(DOXYGEN) $(DOXYFLAGS) $< echo Timestamp > $@ - + install-data-hook: cd $(DESTDIR)$(docdir) && tar xf $(docpkg) diff --git a/ftk/obs/ftk.spec.in b/ftk/obs/flaimtk.spec.in similarity index 77% rename from ftk/obs/ftk.spec.in rename to ftk/obs/flaimtk.spec.in index d5e7bc1..6e098f7 100644 --- a/ftk/obs/ftk.spec.in +++ b/ftk/obs/flaimtk.spec.in @@ -1,6 +1,6 @@ Name: @PACKAGE_TARNAME@ BuildRequires: gcc-c++ libstdc++ libstdc++-devel doxygen -Summary: FTK is the FLAIM cross-platfomr toolkit. +Summary: FLAIMTK is the FLAIM cross-platform toolkit. URL: http://forge.novell.com/modules/xfmod/project/?flaim Version: @PACKAGE_VERSION@ Release: 1 @@ -11,7 +11,7 @@ Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -FTK is the FLAIM cross-platform toolkit. +FLAIMTK is the FLAIM cross-platform toolkit. Authors: -------- @@ -32,19 +32,22 @@ FTK is the FLAIM cross-platform toolkit. %configure make +%check +make check + %install -rm -rf ${RPM_BUILD_ROOT} -make DESTDIR=${RPM_BUILD_ROOT} install +make DESTDIR=%{buildroot} install +# remove the uncompressed doxygen html directory +rm -rf %{buildroot}%{_datadir}/doc/%{name}/html %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf %{buildroot} %files %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/AUTHORS %doc %{_datadir}/doc/%{name}/ChangeLog %doc %{_datadir}/doc/%{name}/COPYING -%doc %{_datadir}/doc/%{name}/COPYRIGHT %doc %{_datadir}/doc/%{name}/INSTALL %doc %{_datadir}/doc/%{name}/NEWS %doc %{_datadir}/doc/%{name}/README @@ -53,6 +56,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libflaimtk.so* %files devel +%{_libdir}/pkgconfig/libflaimtk.pc %{_libdir}/libflaimtk.a %{_includedir}/flaimtk.h diff --git a/sql/Makefile.am b/sql/Makefile.am index 93017c5..d66fdba 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -12,7 +12,7 @@ pkgconfig_DATA = libflaimsql.pc RPM = rpm rpms srcrpm: dist - (cd obj && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 + (cd obs && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 rpmarch=`$(RPM) --showrc | grep "^build arch" | sed 's/\(.*: \)\(.*\)/\2/'`; \ test -z "$$rpmarch" || ( mv $$rpmarch/* .; rm -rf $$rpmarch ) rm -rf $(distdir) diff --git a/sql/obs/sqlflaim.spec.in b/sql/obs/sqlflaim.spec.in index 016aaa2..00d96b1 100644 --- a/sql/obs/sqlflaim.spec.in +++ b/sql/obs/sqlflaim.spec.in @@ -1,6 +1,6 @@ Name: @PACKAGE_TARNAME@ -BuildRequires: gcc-c++ libstdc++-devel -Requires: libstdc++ +BuildRequires: gcc-c++ libstdc++-devel flaimtk-devel +Requires: libstdc++ flaimtk Summary: SQLFLAIM is a SQL database library. URL: http://forge.novell.com/modules/xfmod/project/?flaim Version: @PACKAGE_VERSION@ @@ -33,19 +33,15 @@ SQLFLAIM is a SQL database library. %configure make -%install -rm -rf ${RPM_BUILD_ROOT} -make DESTDIR=${RPM_BUILD_ROOT} install +%check +make check -# remove installed ftk files if they exist -if test -f ${RPM_BUILD_ROOT}/usr/include/flaimtk.h; then - rm ${RPM_BUILD_ROOT}/usr/include/flaimtk.h - rm ${RPM_BUILD_ROOT}/usr/lib64/libflaimtk.* - rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/ftk -fi +%install +make DESTDIR=%{buildroot} install +rm -rf %{buildroot}%{_datadir}/doc/%{name}/html %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf %{buildroot} %files %defattr(-,root,root) @@ -59,6 +55,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libflaimsql.so* %files devel +%{_libdir}/pkgconfig/libflaimsql.pc %{_libdir}/libflaimsql.a %{_includedir}/flaimsql.h diff --git a/xflaim/m4/ac_prog_try_javah.m4 b/xflaim/m4/ac_prog_try_javah.m4 index 63cbe0a..5a22262 100644 --- a/xflaim/m4/ac_prog_try_javah.m4 +++ b/xflaim/m4/ac_prog_try_javah.m4 @@ -21,7 +21,7 @@ AC_DEFUN([AC_PROG_TRY_JAVAH], [AC_REQUIRE([AC_EXEEXT])dnl AC_ARG_VAR([JAVAH], [Java header utility])dnl -AC_CHECK_PROGS([JAVAH], [javah$EXEEXT]) +AC_CHECK_PROGS([JAVAH], [gcjh$EXEEXT javah$EXEEXT]) ifelse([$1],, [if test -z "$JAVAH"; then AC_MSG_WARN([Java header program not found - continuing without javah]) diff --git a/xflaim/obs/xflaim.spec.in b/xflaim/obs/xflaim.spec.in index ba76f20..72a35ee 100644 --- a/xflaim/obs/xflaim.spec.in +++ b/xflaim/obs/xflaim.spec.in @@ -1,6 +1,6 @@ Name: @PACKAGE_TARNAME@ -BuildRequires: gcc-c++ libstdc++-devel gcc-java mono-core doxygen -Requires: libstdc++ mono-core java >= 1.4.2 +BuildRequires: gcc-c++ libstdc++-devel flaimtk-devel gcc-java gjdoc gcc-gij fastjar mono-core doxygen +Requires: libstdc++ flaimtk mono-core java >= 1.4.2 Summary: XFLAIM is an XML database library. URL: http://forge.novell.com/modules/xfmod/project/?flaim Version: @PACKAGE_VERSION@ @@ -33,17 +33,16 @@ XFLAIM is an XML database library. %configure make +%check +make check + %install -rm -rf ${RPM_BUILD_ROOT} -make DESTDIR=${RPM_BUILD_ROOT} install -if test -f ${RPM_BUILD_ROOT}/usr/include/flaimtk.h; then - rm ${RPM_BUILD_ROOT}/usr/include/flaimtk.h - rm ${RPM_BUILD_ROOT}/usr/lib64/libflaimtk.* - rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/ftk -fi +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install +rm -rf %{buildroot}%{_datadir}/doc/%{name}/html %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf %{buildroot} %files %defattr(-,root,root) @@ -57,17 +56,17 @@ rm -rf ${RPM_BUILD_ROOT} %doc %{_datadir}/doc/%{name}/xflaim_csharp.xml %doc %{_datadir}/doc/%{name}/XFLAIMArchitecture.odg %doc %{_datadir}/doc/%{name}/XFLAIMArchitecture.png -%{_datadir}/java/xflaimjni-5.1.jar +%{_datadir}/java/xflaimjni-%{version}.jar %{_libdir}/libxflaim.la %{_libdir}/libxflaim.so* %{_libdir}/xflaim_csharp.dll %{_bindir}/xflmcheckdb %{_bindir}/xflmrebuild -%{_bindir}/xflmsample %{_bindir}/xflmview %{_bindir}/xflmdbshell %files devel +%{_libdir}/pkgconfig/libxflaim.pc %{_libdir}/libxflaim.a %{_includedir}/xflaim.h diff --git a/xflaim/sample/Makefile.am b/xflaim/sample/Makefile.am index f67e968..f350651 100644 --- a/xflaim/sample/Makefile.am +++ b/xflaim/sample/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS = sample +noinst_PROGRAMS = sample XFLAIM_INC=-I$(top_srcdir)/src XFLAIM_LIB=../src/libxflaim.la