--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = cmake
+version = 2.8.4
+release = 1
+
+groups = Development/Tools
+url = http://www.cmake.org
+license = BSD
+summary = Cross-platform make system.
+
+# Add some fixes to work with lto.
+CFLAGS += -Wl,-lpthread
+CXXFLAGS += -Wl,-lpthread
+
+description
+ CMake is used to control the software compilation process using simple \
+ platform and compiler independent configuration files. CMake generates \
+ native makefiles and workspaces that can be used in the compiler \
+ environment of your choice. CMake is quite sophisticated: it is possible \
+ to support complex environments requiring system configuration, pre-processor \
+ generation, code generation, and template instantiation.
+end
+
+build
+ requires
+ expat-devel
+ gcc-c++
+ libarchive-devel
+ libcurl-devel
+ ncurses-devel
+ openssl-devel
+ zlib-devel
+ end
+
+ prepare_cmds
+ # Fixup permissions
+ find -name \*.h -o -name \*.cxx -print0 | xargs -0 chmod -x
+ end
+
+ build
+ mkdir -pv build
+ cd build && ../bootstrap \
+ --prefix=/usr \
+ --datadir=/share/cmake \
+ --docdir=/share/doc/cmake-%{version} \
+ --mandir=/share/man \
+ --system-libs \
+ --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
+
+ make VERBOSE=1 %{PARALLELISMFLAGS}
+ end
+
+ test
+ cd build && bin/ctest -V -E ModuleNotices
+ end
+
+ install
+ cd build && make install DESTDIR=%{BUILDROOT}
+ end
+end
+
+packages
+ package %{name}
+ end
+end