###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
-###############################################################################
-# Definitions
-###############################################################################
-
-include $(PKGROOT)/Include
-
-PKG_NAME = libsolv
-PKG_VER = 0.0.0
-GIT_VER = 0db9d7f
-PKG_REL = 1
+name = libsolv
+version = 0.0.0
+git_ver = 0db9d7f
+release = 1
-PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
-PKG_GROUPS = System/Libraries
-PKG_URL = https://github.com/openSUSE/libsolv
-PKG_LICENSE = BSD
-PKG_SUMMARY = A library for solving package dependencies.
+maintainer = Michael Tremer <michael.tremer@ipfire.org>
+groups = System/Libraries
+url = https://github.com/openSUSE/libsolv
+license = BSD
+summary = A library for solving package dependencies.
-PKG_BUILD_DEPS+= gcc-c++ cmake db4-devel expat-devel zlib-devel
-
-define PKG_DESCRIPTION
+description
A library for solving package dependencies by using a SAT
resolver written in C++.
-endef
+end
+
+thisapp = %{name}-%{version}-%{git_ver}
+
+source_dl =
-THISAPP = $(PKG_NAME)-$(PKG_VER)-$(GIT_VER)
-PKG_TARBALL = $(THISAPP).tar.gz
+build
+ requires
+ gcc-c++
+ cmake
+ db4-devel
+ expat-devel
+ zlib-devel
+ end
-PKG_PACKAGES += $(PKG_NAME)-devel
+ prepare_cmds
+ # Do not build bindings, examples and tools.
+ sed "/bindings/d" -i CMakeLists.txt
+ sed "/examples/d" -i CMakeLists.txt
+ sed "/tools/d" -i CMakeLists.txt
-define STAGE_PREPARE_CMDS
- # Do not build bindings, examples and tools.
- cd $(DIR_APP) && sed "/bindings/d" -i CMakeLists.txt
- cd $(DIR_APP) && sed "/examples/d" -i CMakeLists.txt
- cd $(DIR_APP) && sed "/tools/d" -i CMakeLists.txt
+ # Make sure that libsatsolverext is linked properly to all needed
+ # libraries.
+ echo "TARGET_LINK_LIBRARIES(libsolvext libsolv \${EXPAT_LIBRARY} \${ZLIB_LIBRARY})" \
+ >> ext/CMakeLists.txt
- # Make sure that libsatsolverext is linked properly to all needed
- # libraries.
- cd $(DIR_APP) && echo "TARGET_LINK_LIBRARIES(libsolvext libsolv \$${EXPAT_LIBRARY} \$${ZLIB_LIBRARY})" \
- >> ext/CMakeLists.txt
+ # Remove the RPM stuff when we build with -DFEDORA=1 because we
+ # do not support RPM.
+ sed -e "s/DEBIAN/FEDORA/g" -i ext/CMakeLists.txt
+ end
- # Remove the RPM stuff when we build with -DFEDORA=1 because we
- # do not support RPM.
- cd $(DIR_APP) && sed -e "s/DEBIAN/FEDORA/g" -i ext/CMakeLists.txt
-endef
+ build
+ mkdir build
+ cd build && cmake .. -DFEDORA=1 \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=1
+ make %{PARALELLISMFLAGS}
+ end
-define STAGE_BUILD
- cd $(DIR_APP) && mkdir build
- cd $(DIR_APP)/build && cmake .. -DFEDORA=1 \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_SKIP_RPATH=1
- cd $(DIR_APP)/build && make $(PARALELLISMFLAGS)
-endef
+ install
+ cd build && make install DESTDIR=%{BUILDROOT}
-define STAGE_INSTALL
- cd $(DIR_APP)/build && make install DESTDIR=$(BUILDROOT)
+ # Remove unusable header.
+ rm -vf %{BUILDROOT}/usr/include/solv/repo_rpmdb.h
+ end
+end
- # Remove unusable header.
- rm -vf $(BUILDROOT)/usr/include/solv/repo_rpmdb.h
-endef
+packages
+ package %{name}
+
+ package %{name}-devel
+ template DEVEL
+ end
+end