]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - libsolv/libsolv.nm
Change file layout of the makefiles.
[people/ms/ipfire-3.x.git] / libsolv / libsolv.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = libsolv
7 version = 0.0.0
8 git_ver = 0db9d7f
9 release = 1
10
11 maintainer = Michael Tremer <michael.tremer@ipfire.org>
12 groups = System/Libraries
13 url = https://github.com/openSUSE/libsolv
14 license = BSD
15 summary = A library for solving package dependencies.
16
17 description
18 A library for solving package dependencies by using a SAT
19 resolver written in C++.
20 end
21
22 thisapp = %{name}-%{version}-%{git_ver}
23
24 source_dl =
25
26 build
27 requires
28 gcc-c++
29 cmake
30 db4-devel
31 expat-devel
32 zlib-devel
33 end
34
35 prepare_cmds
36 # Do not build bindings, examples and tools.
37 sed "/bindings/d" -i CMakeLists.txt
38 sed "/examples/d" -i CMakeLists.txt
39 sed "/tools/d" -i CMakeLists.txt
40
41 # Make sure that libsatsolverext is linked properly to all needed
42 # libraries.
43 echo "TARGET_LINK_LIBRARIES(libsolvext libsolv \${EXPAT_LIBRARY} \${ZLIB_LIBRARY})" \
44 >> ext/CMakeLists.txt
45
46 # Remove the RPM stuff when we build with -DFEDORA=1 because we
47 # do not support RPM.
48 sed -e "s/DEBIAN/FEDORA/g" -i ext/CMakeLists.txt
49 end
50
51 build
52 mkdir build
53 cd build && cmake .. -DFEDORA=1 \
54 -DCMAKE_INSTALL_PREFIX=/usr \
55 -DCMAKE_BUILD_TYPE=Release \
56 -DCMAKE_SKIP_RPATH=1
57 make %{PARALELLISMFLAGS}
58 end
59
60 install
61 cd build && make install DESTDIR=%{BUILDROOT}
62
63 # Remove unusable header.
64 rm -vf %{BUILDROOT}/usr/include/solv/repo_rpmdb.h
65 end
66 end
67
68 packages
69 package %{name}
70
71 package %{name}-devel
72 template DEVEL
73 end
74 end