Add rpm macros
This commit is contained in:
parent
7c39125b9b
commit
ac58f9883d
13
cmake.spec
13
cmake.spec
@ -1,6 +1,6 @@
|
||||
Name: cmake
|
||||
Version: 2.4.6
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Cross-platform make system
|
||||
|
||||
Group: Development/Tools
|
||||
@ -8,11 +8,13 @@ License: BSD
|
||||
URL: http://www.cmake.org
|
||||
Source0: http://www.cmake.org/files/v2.4/cmake-%{version}.tar.gz
|
||||
Source1: cmake-init-fedora
|
||||
Source2: macros.cmake
|
||||
Patch0: cmake-2.4.2-fedora.patch
|
||||
Patch1: cmake-2.4.5-xmlrpc.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: ncurses-devel, libX11-devel
|
||||
BuildRequires: curl-devel, expat-devel, xmlrpc-c-devel, zlib-devel
|
||||
Requires: rpm
|
||||
|
||||
|
||||
%description
|
||||
@ -36,7 +38,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
./bootstrap --init=%SOURCE1 --prefix=%{_prefix} --datadir=/share/%{name} \
|
||||
--docdir=/share/doc/%{name}-%{version} --mandir=/share/man \
|
||||
--system-libs
|
||||
make %{?_smp_mflags}
|
||||
make VERBOSE=1 %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
@ -46,6 +48,9 @@ find $RPM_BUILD_ROOT/%{_datadir}/%{name}/Modules -type f | xargs chmod -x
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
|
||||
cp -a Example $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/
|
||||
install -m 0644 Docs/cmake-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
|
||||
# RPM macros
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
|
||||
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
|
||||
|
||||
|
||||
%clean
|
||||
@ -54,6 +59,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.cmake
|
||||
%{_datadir}/doc/%{name}-%{version}/
|
||||
%{_bindir}/ccmake
|
||||
%{_bindir}/cmake
|
||||
@ -65,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Apr 06 2007 Orion Poplawski <orion@cora.nwra.com> - 2.4.6-2
|
||||
- Add rpm macros
|
||||
|
||||
* Thu Jan 11 2007 Orion Poplawski <orion@cora.nwra.com> - 2.4.6-1
|
||||
- Update to 2.4.6
|
||||
|
||||
|
16
macros.cmake
Normal file
16
macros.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Macros for cmake
|
||||
#
|
||||
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
|
||||
%__cmake %{_bindir}/cmake
|
||||
|
||||
%cmake \
|
||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
||||
%__cmake \\\
|
||||
%if "%{?_lib}" == "lib64" \
|
||||
%{?_cmake_lib_suffix64} \\\
|
||||
%endif \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
|
||||
-DBUILD_SHARED_LIBS:BOOL=ON
|
Loading…
Reference in New Issue
Block a user