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 Summary: A C++ port of Lucene
Name: clucene Name: clucene
Version: 2.3.3.4 Version: 2.3.3.4
Release: 1%{?dist} Release: 2%{?dist}
License: LGPLv2+ or ASL 2.0 License: LGPLv2+ or ASL 2.0
Group: Development/System Group: Development/System
URL: http://www.sourceforge.net/projects/clucene URL: http://www.sourceforge.net/projects/clucene
@ -31,47 +31,41 @@ Group: Development/Libraries
Requires: %{name}-core = %{version}-%{release} Requires: %{name}-core = %{version}-%{release}
%description core-devel %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 developing with clucene
%prep %prep
%setup -n %{name}-core-%{version} %setup -n %{name}-core-%{version}
%build %build
mkdir fedora mkdir -p %{_target_platform}
cd fedora pushd %{_target_platform}
export CFLAGS="%{optflags}" %{cmake} \
export CXXFLAGS="%{optflags}" -DLIB_DESTINATION:PATH=%{_libdir} \
export FFLAGS="%{optflags}" -DLUCENE_SYS_INCLUDE:PATH=%{_libdir}/clucene2 \
%ifarch x86_64 ppc64 -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
%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} popd
make %{?_smp_mflags} -C %{_target_platform}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
cd fedora
make DESTDIR=%{buildroot} install make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake rm -rf %{buildroot}%{_libdir}/CLuceneConfig.cmake
%check %check
cd fedora make cl_test -C %{_target_platform}
make cl_test make test -C %{_target_platform}
make test
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%post -p /sbin/ldconfig %post core -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun core -p /sbin/ldconfig
%files core %files core
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -90,6 +84,10 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libclucene-core.pc %{_libdir}/pkgconfig/libclucene-core.pc
%changelog %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 * Thu Jun 02 2011 Deji Akingunola <dakingun@gmail.com> - 2.3.3.4-1
- Update to version 2.3.3.4 - Update to version 2.3.3.4