]>
Commit | Line | Data |
---|---|---|
f9813e82 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
4 | # | |
5 | Summary: A 2D constrained Delaunay triangulation library | |
6 | Summary(pl.UTF-8): Biblioteka triangulacji Delaunaya z ograniczeniami w 2D | |
7 | Name: poly2tri-c | |
8 | Version: 0.0 | |
9 | %define snap 20150515 | |
10 | Release: 0.%{snap}.1 | |
11 | License: BSD | |
75c9b35e | 12 | Group: Libraries |
d84cc1b0 | 13 | #Source0Download: https://github.com/Paul-Browne/poly2tri-c/releases |
75c9b35e JB |
14 | #Source0: https://poly2tri-c.googlecode.com/archive/5ac75d6f09e4de35ef33289c69bc1d46c2a04970.tar.gz |
15 | Source0: 5ac75d6f09e4de35ef33289c69bc1d46c2a04970.tar.gz | |
f9813e82 JB |
16 | # Source0-md5: f800bb38025009fefe781841ed0a3c36 |
17 | Patch0: %{name}-build.patch | |
7439b01d | 18 | Patch1: compile.patch |
d84cc1b0 | 19 | URL: https://github.com/Paul-Browne/poly2tri-c |
f9813e82 JB |
20 | BuildRequires: OpenGL-devel |
21 | BuildRequires: autoconf >= 2.50 | |
22 | BuildRequires: automake | |
23 | BuildRequires: glib2-devel >= 1:2.28 | |
24 | BuildRequires: libtool >= 2:2 | |
25 | BuildRequires: pkgconfig | |
d6a545cd | 26 | Requires: glib2 >= 1:2.28 |
f9813e82 JB |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | This is a C port of the poly2tri library - a fast and powerful library | |
31 | for computing 2D constrained Delaunay triangulations. Instead of the | |
32 | standard C++ library (which included some utilities and template-based | |
33 | data structures), this port depends on GLib for it's data structures | |
34 | and some of it's utilities. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Ten pakiet zawiera port C biblioteki poly2tri - szybkiej i potężnej | |
38 | biblioteki do obliczania triangulacji Delaunaya z ograniczeniami w 2D. | |
39 | Zamiast biblioteki standardowej C++ (zawierającej trochę narzędzi oraz | |
40 | struktury danych oparte na szablonach), ten port wykorzystuje | |
41 | bibliotekę GLib na potrzeby struktur danych oraz niektórych narzędzi. | |
42 | ||
43 | %package devel | |
44 | Summary: Development files for poly2tri-c library | |
45 | Summary(pl.UTF-8): Pliki programistyczne biblioteki poly2tri-c | |
46 | Group: Development/Libraries | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | Requires: glib2-devel >= 1:2.28 | |
49 | ||
50 | %description devel | |
51 | Development files for poly2tri-c library. | |
52 | ||
53 | %description devel -l pl.UTF-8 | |
54 | Pliki programistyczne biblioteki poly2tri-c. | |
55 | ||
56 | %package static | |
57 | Summary: Static poly2tri-c library | |
58 | Summary(pl.UTF-8): Biblioteka statyczna poly2tri-c | |
59 | Group: Development/Libraries | |
60 | Requires: %{name}-devel = %{version}-%{release} | |
61 | ||
62 | %description static | |
63 | Static poly2tri-c library. | |
64 | ||
65 | %description static -l pl.UTF-8 | |
66 | Biblioteka statyczna poly2tri-c. | |
67 | ||
68 | %prep | |
69 | %setup -q -n %{name}-5ac75d6f09e4 | |
70 | %patch0 -p1 | |
7439b01d | 71 | %patch1 -p1 |
f9813e82 JB |
72 | |
73 | %build | |
74 | %{__libtoolize} | |
75 | %{__aclocal} -I m4 | |
76 | %{__autoheader} | |
77 | %{__autoconf} | |
78 | %{__automake} | |
79 | %configure \ | |
80 | --disable-silent-rules \ | |
81 | %{!?with_static_libs:--disable-static} | |
82 | %{__make} -j1 | |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %{__make} install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT | |
89 | ||
90 | # obsoleted by pkg-config | |
91 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpoly2tri-c-*.la | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post -p /sbin/ldconfig | |
97 | %postun -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc COPYING LICENSE-Poly2Tri.txt LICENSE-Poly2Tri-C.txt README | |
102 | %attr(755,root,root) %{_bindir}/p2tc | |
103 | %attr(755,root,root) %{_libdir}/libpoly2tri-c-0.1.so.*.*.* | |
104 | %attr(755,root,root) %ghost %{_libdir}/libpoly2tri-c-0.1.so.0 | |
105 | ||
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
108 | %attr(755,root,root) %{_libdir}/libpoly2tri-c-0.1.so | |
109 | %{_includedir}/poly2tri-c-0.1 | |
110 | %{_pkgconfigdir}/poly2tri-c.pc | |
111 | ||
112 | %if %{with static_libs} | |
113 | %files static | |
114 | %defattr(644,root,root,755) | |
115 | %{_libdir}/libpoly2tri-c-0.1.a | |
116 | %endif |