]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - libsolv/libsolv.nm
Merge remote-tracking branch 'stevee/libatasmart'
[people/arne_f/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 = 3.git%{git_ver}
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 # Remove -Werror from gcc command line.
37 find . -name CMakeLists.txt | xargs sed -e "s/-Werror//g" -i
38
39 # Do not build bindings, examples and tools.
40 sed "/bindings/d" -i CMakeLists.txt
41 sed "/examples/d" -i CMakeLists.txt
42 sed "/tools/d" -i CMakeLists.txt
43
44 # Make sure that libsatsolverext is linked properly to all needed
45 # libraries.
46 echo "TARGET_LINK_LIBRARIES(libsolvext libsolv \${EXPAT_LIBRARY} \${ZLIB_LIBRARY})" \
47 >> ext/CMakeLists.txt
48
49 # Remove the RPM stuff when we build with -DFEDORA=1 because we
50 # do not support RPM.
51 sed -e "s/DEBIAN/FEDORA/g" -i ext/CMakeLists.txt
52 end
53
54 build
55 mkdir build
56 cd build && cmake .. -DFEDORA=1 \
57 -DCMAKE_INSTALL_PREFIX=/usr \
58 -DCMAKE_BUILD_TYPE=Release \
59 -DCMAKE_SKIP_RPATH=1
60 make %{PARALELLISMFLAGS}
61 end
62
63 install
64 cd build && make install DESTDIR=%{BUILDROOT}
65
66 # Remove unusable header.
67 rm -vf %{BUILDROOT}/usr/include/solv/repo_rpmdb.h
68 end
69 end
70
71 packages
72 package %{name}
73
74 package %{name}-devel
75 template DEVEL
76 end
77
78 package %{name}-debuginfo
79 template DEBUGINFO
80 end
81 end