From: Michael Tremer Date: Tue, 9 Oct 2012 12:26:00 +0000 (+0200) Subject: cmake: Add pakfire macro. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=deee147b09972aab9df623f42089f9b2df505f14;p=ipfire-3.x.git cmake: Add pakfire macro. This macro makes it more easy to build packages in a consistent way with cmake. --- diff --git a/cmake/cmake.macro b/cmake/cmake.macro new file mode 100644 index 000000000..222a9509a --- /dev/null +++ b/cmake/cmake.macro @@ -0,0 +1,18 @@ +# +# cmake macros +# + +__cmake = /usr/bin/cmake +if "${lib}" == "lib64" + __cmake_lib_suffix = -DLIB_SUFFIX=64 +end + +cmake = %{__cmake} \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=%{prefix} \ + -DINCLUDE_INSTALL_DIR:PATH=%{includedir} \ + -DLIB_INSTALL_DIR:PATH=%{libdir} \ + -DSYSCONF_INSTALL_DIR:PATH=%{sysconfdir} \ + -DSHARE_INSTALL_PREFIX:PATH=%{datadir} \ + %{__cmake_lib_suffix} \ + -DBUILD_SHARED_LIBS:BOOL=ON diff --git a/cmake/cmake.nm b/cmake/cmake.nm index ddbe23aa0..c037f8737 100644 --- a/cmake/cmake.nm +++ b/cmake/cmake.nm @@ -5,7 +5,7 @@ name = cmake version = 2.8.4 -release = 1 +release = 2 groups = Development/Tools url = http://www.cmake.org @@ -60,12 +60,16 @@ build install cd build && make install DESTDIR=%{BUILDROOT} + + # Install pakfire macro. + mkdir -p %{BUILDROOT}/usr/lib/pakfire/macros + install -v -m 644 %{DIR_SOURCE}/cmake.macro \ + %{BUILDROOT}/usr/lib/pakfire/macros end end packages package %{name} - end package %{name}-debuginfo template DEBUGINFO