]>
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 | |
f1de85a8 | 9 | release = 3.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 | 35 | prepare_cmds |
f1de85a8 MT |
36 | # Remove -Werror from gcc command line. |
37 | find . -name CMakeLists.txt | xargs sed -e "s/-Werror//g" -i | |
38 | ||
802ea3af MT |
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 | |
1fc81377 | 43 | |
802ea3af MT |
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 | |
1fc81377 | 48 | |
802ea3af MT |
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 | |
1fc81377 | 53 | |
802ea3af MT |
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 | |
1fc81377 | 62 | |
802ea3af MT |
63 | install |
64 | cd build && make install DESTDIR=%{BUILDROOT} | |
1fc81377 | 65 | |
802ea3af MT |
66 | # Remove unusable header. |
67 | rm -vf %{BUILDROOT}/usr/include/solv/repo_rpmdb.h | |
68 | end | |
69 | end | |
1fc81377 | 70 | |
802ea3af MT |
71 | packages |
72 | package %{name} | |
1f9bc2f0 | 73 | |
802ea3af MT |
74 | package %{name}-devel |
75 | template DEVEL | |
76 | end | |
1f9bc2f0 MT |
77 | |
78 | package %{name}-debuginfo | |
79 | template DEBUGINFO | |
80 | end | |
802ea3af | 81 | end |