cleanup cmake usage

fix scriptlets
This commit is contained in:
Rex Dieter 2011-06-14 15:30:48 -05:00
parent d93c62be6b
commit aaeb61930a

View File

@ -1,7 +1,7 @@
Summary: A C++ port of Lucene
Name: clucene
Version: 2.3.3.4
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+ or ASL 2.0
Group: Development/System
URL: http://www.sourceforge.net/projects/clucene
@ -31,47 +31,41 @@ Group: Development/Libraries
Requires: %{name}-core = %{version}-%{release}
%description core-devel
This package contains the static libraries and header files needed for
This package contains the libraries and header files needed for
developing with clucene
%prep
%setup -n %{name}-core-%{version}
%build
mkdir fedora
cd fedora
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export FFLAGS="%{optflags}"
%ifarch x86_64 ppc64
%define lib_suffix 64
%else
%define lib_suffix %{nil}
%endif
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_DESTINATION=%{_libdir} -DLIB_SUFFIX=%{lib_suffix} \
-DLUCENE_SYS_INCLUDES=%{_libdir} \
..
make VERBOSE=1 %{?_smp_mflags}
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
-DLIB_DESTINATION:PATH=%{_libdir} \
-DLUCENE_SYS_INCLUDE:PATH=%{_libdir}/clucene2 \
-DINCLUDE_INSTALL_DIR:PATH=/usr/include \
..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
rm -rf %{buildroot}
cd fedora
make DESTDIR=%{buildroot} install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake
%check
cd fedora
make cl_test
make test
make cl_test -C %{_target_platform}
make test -C %{_target_platform}
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%post core -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%postun core -p /sbin/ldconfig
%files core
%defattr(-, root, root, -)
@ -90,6 +84,10 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libclucene-core.pc
%changelog
* Wed Jun 08 2011 Rex Dieter <rdieter@fedoraproject.org> 2.3.3.4-2
- cleanup cmake usage
- fix scriptlets
* Thu Jun 02 2011 Deji Akingunola <dakingun@gmail.com> - 2.3.3.4-1
- Update to version 2.3.3.4