]> git.pld-linux.org Git - packages/libhandy.git/blob - libhandy.spec
b7c814579e4b2918684bd333db56b6cf9f4a9745
[packages/libhandy.git] / libhandy.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs # API documentation
4 %bcond_without  glade   # Glade module+catalog
5 %bcond_without  vala    # Vala API
6
7 Summary:        Library with GTK+ widgets for mobile phones
8 Summary(pl.UTF-8):      Biblioteka z kontrolkami GTK+ dla telefonów komórkowych
9 Name:           libhandy
10 Version:        0.0.9
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries
14 Source0:        https://source.puri.sm/Librem5/libhandy/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
15 # Source0-md5:  67b24b031834b9649c609aca8305dc50
16 URL:            https://source.puri.sm/Librem5/libhandy/
17 # -std=gnu11
18 BuildRequires:  gcc >= 6:4.7
19 %{?with_glade:BuildRequires:    glade-devel >= 2.0}
20 BuildRequires:  glib2-devel >= 1:2.44
21 BuildRequires:  gobject-introspection-devel
22 BuildRequires:  gtk+3-devel >= 3.24.1
23 BuildRequires:  gtk-doc
24 BuildRequires:  meson >= 0.47.0
25 BuildRequires:  ninja >= 1.5
26 BuildRequires:  pkgconfig
27 BuildRequires:  rpmbuild(macros) >= 1.736
28 %{?with_vala:BuildRequires:     vala >= 2:0.27.0}
29 Requires:       glib2 >= 1:2.44
30 Requires:       gtk+3 >= 3.24.1
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 libhandy provides GTK+ widgets and GObjects to ease developing
35 applications for mobile phones.
36
37 %description -l pl.UTF-8
38 libhandy dostarcza kontrolki GTK+ i GObjects, upraszczając tworzenie
39 aplikacji dla telefonów komórkowych.
40
41 %package devel
42 Summary:        Header files for libhandy library
43 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libhandy
44 Group:          Development/Libraries
45 Requires:       %{name} = %{version}-%{release}
46 Requires:       glib2-devel >= 1:2.44
47 Requires:       gtk+3-devel >= 3.24.1
48
49 %description devel
50 Header files for libhandy library
51
52 %description devel -l pl.UTF-8
53 Pliki nagłówkowe biblioteki libhandy
54
55 %package glade
56 Summary:        libhandy module for Glade
57 Summary(pl.UTF-8):      Moduł libhandy dla Glade
58 Group:          X11/Development/Libraries
59 Requires:       %{name}-devel = %{version}-%{release}
60 Requires:       glade >= 2.0
61
62 %description glade
63 libhandy module for Glade.
64
65 %description glade -l pl.UTF-8
66 Moduł libhandy dla Glade.
67
68 %package apidocs
69 Summary:        API documentation for libhandy library
70 Summary(pl.UTF-8):      Dokumentacja API biblioteki libhandy
71 Group:          Documentation
72 %if "%{_rpmversion}" >= "5"
73 BuildArch:      noarch
74 %endif
75
76 %description apidocs
77 API documentation for libhandy library.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API biblioteki libhandy
81
82 %package -n vala-libhandy
83 Summary:        Vala API for libhandy libraries
84 Summary(pl.UTF-8):      API języka Vala do bibliotek libhandy
85 Group:          Development/Libraries
86 Requires:       %{name}-devel = %{version}-%{release}
87 Requires:       vala >= 2:0.16.0
88 %if "%{_rpmversion}" >= "5"
89 BuildArch:      noarch
90 %endif
91
92 %description -n vala-libhandy
93 Vala API for libhandy library.
94
95 %description -n vala-libhandy -l pl.UTF-8
96 API języka VALA do biblioteki libhandy.
97
98 %prep
99 %setup -q -n %{name}-v%{version}
100
101 %build
102 %meson build \
103         -Dexamples=false \
104         %{!?with_glade:-Dglade_catalog=false} \
105         %{?with_apidocs:-Dgtk_doc=true} \
106         %{!?with_vala:-Dvapi=false}
107
108 %ninja_build -C build
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %ninja_install -C build
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %post   -p /sbin/ldconfig
119 %postun -p /sbin/ldconfig
120
121 %files
122 %defattr(644,root,root,755)
123 %doc AUTHORS README.md
124 %attr(755,root,root) %{_libdir}/libhandy-0.0.so.0
125 %{_libdir}/girepository-1.0/Handy-0.0.typelib
126
127 %files devel
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_libdir}/libhandy-0.0.so
130 %{_includedir}/libhandy-0.0
131 %{_pkgconfigdir}/libhandy-0.0.pc
132 %{_datadir}/gir-1.0/Handy-0.0.gir
133
134 %if %{with glade}
135 %files glade
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_libdir}/glade/modules/libglade-handy.so
138 %{_datadir}/glade/catalogs/libhandy.xml
139 %endif
140
141 %if %{with apidocs}
142 %files apidocs
143 %defattr(644,root,root,755)
144 %{_gtkdocdir}/libhandy
145 %endif
146
147 %if %{with vala}
148 %files -n vala-libhandy
149 %defattr(644,root,root,755)
150 %{_datadir}/vala/vapi/libhandy-0.0.deps
151 %{_datadir}/vala/vapi/libhandy-0.0.vapi
152 %endif
This page took 0.087311 seconds and 2 git commands to generate.