]> git.pld-linux.org Git - packages/createrepo_c.git/blob - createrepo_c.spec
- new; ported to rpm5, but tests fail
[packages/createrepo_c.git] / createrepo_c.spec
1 # TODO: tests fail (rpm.org vs rpm5 compat problems?)
2 #
3 # Conditional build:
4 %bcond_without  tests   # make tests
5 #
6 Summary:        Creates a common metadata repository
7 Summary(pl.UTF-8):      Tworzenie wspólnego repozytorium metadanych
8 Name:           createrepo_c
9 Version:        0.2.1
10 %define snap    20131129
11 Release:        0.%{snap}.1
12 License:        GPL v2+
13 Group:          Applications/System
14 # git clone https://github.com/Tojaj/createrepo_c
15 Source0:        createrepo_c.tar.xz
16 # Source0-md5:  afc0dabd7f75f2ad2d34a07966ee87ce
17 Patch0:         %{name}-rpm5.patch
18 URL:            https://github.com/Tojaj/createrepo_c
19 BuildRequires:  bzip2-devel
20 BuildRequires:  check-devel
21 BuildRequires:  cmake >= 2.6
22 BuildRequires:  curl-devel
23 BuildRequires:  doxygen
24 BuildRequires:  expat-devel
25 BuildRequires:  glib2-devel >= 1:2.22.0
26 BuildRequires:  libmagic-devel
27 BuildRequires:  libxml2-devel >= 2
28 BuildRequires:  openssl-devel
29 BuildRequires:  python-devel >= 2
30 %{?with_tests:BuildRequires:    python-nose}
31 BuildRequires:  rpm-devel >= 5
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.219
34 BuildRequires:  sqlite3-devel >= 3
35 BuildRequires:  tar >= 1:1.22
36 BuildRequires:  xz
37 BuildRequires:  xz-devel
38 BuildRequires:  zlib-devel
39 Requires:       %{name}-libs = %{version}-%{release}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 C implementation of Createrepo. This utility will generate a common
44 metadata repository from a directory of RPM packages.
45
46 %description -l pl.UTF-8
47 Implementacja w C programu Createrepo. To narzędzie generuje wspólne
48 repozytorium metadanych z katalogu pakietów RPM.
49
50 %package libs
51 Summary:        Library for repodata manipulation
52 Summary(pl.UTF-8):      Biblioteka do operacji na danych repozytorium
53 Group:          Libraries
54 Requires:       glib2 >= 1:2.22.0
55
56 %description libs
57 This package contains the createrepo_c library for applications to
58 easy manipulate with a repodata.
59
60 %description libs -l pl.UTF-8
61 Ten pakiet zawiera bibliotekę createrepo_c, pozwalającą aplikacjom na
62 łatwe operowanie na danych repozytorium (repodata).
63
64 %package devel
65 Summary:        Header files for createrepo_c library
66 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki createrepo_c
67 Group:          Development/Libraries
68 Requires:       %{name}-libs = %{version}-%{release}
69 Requires:       bzip2-devel
70 Requires:       curl-devel
71 Requires:       expat-devel
72 Requires:       glib2-devel >= 1:2.22.0
73 Requires:       libmagic-devel
74 Requires:       libxml2-devel >= 2
75 Requires:       rpm-devel >= 5
76 Requires:       sqlite3-devel >= 3
77 Requires:       xz-devel
78 Requires:       zlib-devel
79
80 %description devel
81 This package contains the createrepo_c C header files. These
82 development files are for easy manipulation with a repodata.
83
84 %description devel -l pl.UTF-8
85 Ten pakiet zawiera pliki nagłówkowe C biblioteki createrepo_c. Mają
86 na celu łatwe operowanie na danych repozytorium (repodata).
87
88 %package apidocs
89 Summary:        API documentation for createrepo_c library
90 Summary(pl.UTF-8):      Dokumentacja API biblioteki createrepo_c
91 Group:          Documentation
92
93 %description apidocs
94 API documentation for createrepo_c library.
95
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API biblioteki createrepo_c.
98
99 %package -n python-createrepo_c
100 Summary:        Python bindings for the createrepo_c library
101 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki createrepo_c
102 Group:          Development/Languages/Python
103 Requires:       %{name}-libs = %{version}-%{release}
104
105 %description -n python-createrepo_c
106 Python bindings for the createrepo_c library.
107
108 %description -n python-createrepo_c -l pl.UTF-8
109 Wiązania Pythona do biblioteki createrepo_c.
110
111 %package -n bash-completion-createrepo_c
112 Summary:        Bash completion for createrepo_c commands
113 Summary(pl.UTF-8):      Bashowe uzupełnianie dla poleceń createrepo_c
114 Group:          Applications/Shells
115 Requires:       %{name} = %{version}-%{release}
116 Requires:       bash-completion
117
118 %description -n bash-completion-createrepo_c
119 Bash completion for createrepo_c commands (createrepo_c, mergerepo_c,
120 modifyrepo_c).
121
122 %description -n bash-completion-createrepo_c -l pl.UTF-8
123 Bashowe uzupełnianie dla poleceń createrepo_c (createrepo_c,
124 mergerepo_c, modifyrepo_c).
125
126 %prep
127 %setup -q -n %{name}
128 %patch0 -p1
129
130 %build
131 %cmake .
132 %{__make}
133 %{__make} doc
134
135 %if %{with tests}
136 %{__make} tests
137 %{__make} test \
138         ARGS="-V"
139 %endif
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
148 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/createrepo_c
149 %py_postclean
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %post   libs -p /sbin/ldconfig
155 %postun libs -p /sbin/ldconfig
156
157 %files
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/createrepo_c
160 %attr(755,root,root) %{_bindir}/mergerepo_c
161 %attr(755,root,root) %{_bindir}/modifyrepo_c
162 %{_mandir}/man8/createrepo_c.8*
163 %{_mandir}/man8/mergerepo_c.8*
164
165 %files libs
166 %defattr(644,root,root,755)
167 %doc AUTHORS README.md
168 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so.*.*.*
169 %attr(755,root,root) %ghost %{_libdir}/libcreaterepo_c.so.0
170
171 %files devel
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{_libdir}/libcreaterepo_c.so
174 %{_pkgconfigdir}/createrepo_c.pc
175 %{_includedir}/createrepo_c
176
177 %files apidocs
178 %defattr(644,root,root,755)
179 %doc doc/html
180
181 %files -n python-createrepo_c
182 %defattr(644,root,root,755)
183 %dir %{py_sitedir}/createrepo_c
184 %attr(755,root,root) %{py_sitedir}/createrepo_c/_createrepo_cmodule.so
185 %{py_sitedir}/createrepo_c/__init__.py[co]
186
187 %files -n bash-completion-createrepo_c
188 %defattr(644,root,root,755)
189 /etc/bash_completion.d/createrepo_c.bash
This page took 0.184952 seconds and 3 git commands to generate.