]> git.pld-linux.org Git - packages/libbytesize.git/blob - libbytesize.spec
993401b3f65b51e37536f4655079cab2e05312df
[packages/libbytesize.git] / libbytesize.spec
1 Summary:        A library for working with sizes in bytes
2 Name:           libbytesize
3 Version:        1.4
4 Release:        1
5 License:        LGPL v2+
6 Group:          Libraries
7 Source0:        https://github.com/storaged-project/libbytesize/releases/download/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  aa9bd5a04546873714da2adbaaa9f283
9 URL:            https://github.com/storaged-project/libbytesize
10 BuildRequires:  autoconf
11 BuildRequires:  automake
12 BuildRequires:  gmp-devel
13 BuildRequires:  gtk-doc
14 BuildRequires:  libtool
15 BuildRequires:  mpfr-devel
16 BuildRequires:  pcre-devel >= 8.32
17 BuildRequires:  pkgconfig
18 BuildRequires:  python3-devel
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 The libbytesize is a C library that facilitates work with sizes in
23 bytes. Be it parsing the input from users or producing a nice human
24 readable representation of a size in bytes this library takes
25 localization into account. It also provides support for sizes bigger
26 than MAXUINT64.
27
28 %package devel
29 Summary:        Header files for libbytesize library
30 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libbytesize
31 Group:          Development/Libraries
32 Requires:       %{name} = %{version}-%{release}
33
34 %description devel
35 Header files for libbytesize library.
36
37 %description devel -l pl.UTF-8
38 Pliki nagłówkowe biblioteki libbytesize.
39
40 %package apidocs
41 Summary:        libbytesize library API documentation
42 Summary(pl.UTF-8):      Dokumentacja API biblioteki libbytesize
43 Group:          Documentation
44 Requires:       gtk-doc-common
45
46 %description apidocs
47 API documentation for libbytesize library.
48
49 %description apidocs -l pl.UTF-8
50 Dokumentacja API biblioteki libbytesize.
51
52 %package -n python-bytesize
53 Summary:        Python 2 bindings for libbytesize
54 Group:          Libraries/Python
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       python-six
57
58 %description -n python-bytesize
59 This package contains Python 2 bindings for libbytesize.
60
61 %package -n python3-bytesize
62 Summary:        Python 3 bindings for libbytesize
63 Group:          Libraries/Python
64 Requires:       %{name} = %{version}-%{release}
65 Requires:       python3-six
66
67 %description -n python3-bytesize
68 This package contains Python 3 bindings for libbytesize.
69
70 %prep
71 %setup -q
72
73 %build
74 %{__libtoolize}
75 %{__aclocal} -I m4
76 %{__autoconf}
77 %{__automake}
78 %configure
79 %{__make}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
84
85 %{__make} install \
86         DESTDIR=$RPM_BUILD_ROOT
87
88 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
89 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
90 %py_postclean
91
92 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
93 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
94
95 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
96
97 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/gtk-doc/html/libbytesize,%{_gtkdocdir}}
98
99 %find_lang %{name}
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post   -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %files -f %{name}.lang
108 %defattr(644,root,root,755)
109 %doc README.md
110 %attr(755,root,root) %{_libdir}/libbytesize.so.*.*.*
111 %attr(755,root,root) %ghost %{_libdir}/libbytesize.so.1
112
113 %files devel
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_libdir}/libbytesize.so
116 %{_includedir}/bytesize
117 %{_pkgconfigdir}/bytesize.pc
118
119 %files apidocs
120 %defattr(644,root,root,755)
121 %{_gtkdocdir}/libbytesize
122
123 %files -n python-bytesize
124 %defattr(644,root,root,755)
125 %dir %{py_sitedir}/bytesize
126 %{py_sitedir}/bytesize/*.py[co]
127
128 %files -n python3-bytesize
129 %defattr(644,root,root,755)
130 %dir %{py3_sitedir}/bytesize
131 %{py3_sitedir}/bytesize/__pycache__
132 %{py3_sitedir}/bytesize/*.py
This page took 0.042658 seconds and 2 git commands to generate.