]>
Commit | Line | Data |
---|---|---|
1fc81377 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
1fc81377 MT |
4 | ############################################################################### |
5 | ||
802ea3af MT |
6 | name = libsolv |
7 | version = 0.0.0 | |
8 | git_ver = 0db9d7f | |
d3f9d56f | 9 | release = 2.git%{git_ver} |
1fc81377 | 10 | |
802ea3af MT |
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. | |
1fc81377 | 16 | |
802ea3af | 17 | description |
1fc81377 MT |
18 | A library for solving package dependencies by using a SAT |
19 | resolver written in C++. | |
802ea3af MT |
20 | end |
21 | ||
22 | thisapp = %{name}-%{version}-%{git_ver} | |
23 | ||
24 | source_dl = | |
1fc81377 | 25 | |
802ea3af MT |
26 | build |
27 | requires | |
28 | gcc-c++ | |
29 | cmake | |
30 | db4-devel | |
31 | expat-devel | |
32 | zlib-devel | |
33 | end | |
1fc81377 | 34 | |
802ea3af MT |
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 | |
1fc81377 | 40 | |
802ea3af MT |
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 | |
1fc81377 | 45 | |
802ea3af MT |
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 | |
1fc81377 | 50 | |
802ea3af MT |
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 | |
1fc81377 | 59 | |
802ea3af MT |
60 | install |
61 | cd build && make install DESTDIR=%{BUILDROOT} | |
1fc81377 | 62 | |
802ea3af MT |
63 | # Remove unusable header. |
64 | rm -vf %{BUILDROOT}/usr/include/solv/repo_rpmdb.h | |
65 | end | |
66 | end | |
1fc81377 | 67 | |
802ea3af MT |
68 | packages |
69 | package %{name} | |
70 | ||
71 | package %{name}-devel | |
72 | template DEVEL | |
73 | end | |
74 | end |