]> git.pld-linux.org Git - packages/mogwai.git/blob - mogwai.spec
- updated to 0.2.1
[packages/mogwai.git] / mogwai.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4 #
5 Summary:        Mogwai - monitor network usage and schedule downloads do minimize their cost
6 Summary(pl.UTF-8):      Mogwai - monitorowanie wykorzystania sieci i planowanie pobrań tak, aby zminimalizować ich koszt
7 Name:           mogwai
8 Version:        0.2.1
9 Release:        1
10 License:        LGPL v2.1+
11 Group:          Libraries
12 #Source0Download: https://gitlab.freedesktop.org/pwithnall/mogwai/-/tags
13 Source0:        https://gitlab.freedesktop.org/pwithnall/mogwai/-/archive/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5:  2df5dbccab51074fcc402f3330d6d2b4
15 URL:            https://gitlab.freedesktop.org/pwithnall/mogwai
16 BuildRequires:  NetworkManager-devel >= 2:1.8.0
17 BuildRequires:  glib2-devel >= 1:2.57.1
18 BuildRequires:  libsoup-devel >= 2.42
19 BuildRequires:  meson >= 0.50.0
20 BuildRequires:  ninja >= 1.5
21 BuildRequires:  pkgconfig
22 BuildRequires:  rpmbuild(macros) >= 1.736
23 BuildRequires:  systemd-devel
24 Requires:       %{name}-libs = %{version}-%{release}
25 Requires:       libsoup >= 2.42
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Mogwai allows systems to take advantage of reduced cost bandwidth at
30 off-peak times of day. It provides a monitoring daemon which checks
31 bandwidth usage, a scheduling daemon which prioritises downloads to
32 minimise cost, and a tariff library which describes different data
33 plans.
34
35 This package contains client tools.
36
37 %description -l pl.UTF-8
38 Mogwai pozwala systemom wykorzystywać mniejszy koszt pobierania danych
39 poza godzinami szczytu. Zawiera demona monitorującego, sprawdzającego
40 wykorzystanie sieci, demona planującego, który określa priorytet
41 pobrań w celu zminimalizowania kosztu oraz bibliotekę taryfikującą,
42 opisującą różne plany danych.
43
44 Ten pakiet zawiera narzędzia klienckie.
45
46 %package libs
47 Summary:        Mogwai shared libraries
48 Summary(pl.UTF-8):      Biblioteki współdzielone Mogwai
49 Group:          Libraries
50 Requires:       glib2 >= 1:2.57.1
51
52 %description libs
53 Mogwai shared libraries.
54
55 %description libs -l pl.UTF-8
56 Biblioteki współdzielone Mogwai.
57
58 %package devel
59 Summary:        Header files for Mogwai library
60 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Mogwai
61 Group:          Development/Libraries
62 Requires:       %{name}-libs = %{version}-%{release}
63 Requires:       glib2-devel >= 1:2.57.1
64
65 %description devel
66 Header files for Mogwai library.
67
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe biblioteki Mogwai.
70
71 %package static
72 Summary:        Static Mogwai library
73 Summary(pl.UTF-8):      Statyczna biblioteka Mogwai
74 Group:          Development/Libraries
75 Requires:       %{name}-devel = %{version}-%{release}
76
77 %description static
78 Static Mogwai library.
79
80 %description static -l pl.UTF-8
81 Statyczna biblioteka Mogwai.
82
83 %package scheduled
84 Summary:        Mogwai scheduling daemon
85 Summary(pl.UTF-8):      Demon planujący Mogwai
86 Group:          Daemons
87 Requires(pre):  /bin/id
88 Requires(pre):  /usr/bin/getgid
89 Requires(pre):  /usr/sbin/useradd
90 Requires(pre):  /usr/sbin/groupadd
91 Requires(post,preun,postun):    systemd-units >= 38
92 Requires(postun):       /usr/sbin/userdel
93 Requires(postun):       /usr/sbin/groupdel
94 Requires:       %{name}-libs = %{version}-%{release}
95 Requires:       NetworkManager >= 2:1.8.0
96 Requires:       systemd
97 Provides:       group(mogwai-scheduled)
98 Provides:       user(mogwai-scheduled)
99
100 %description scheduled
101 Mogwai allows systems to take advantage of reduced cost bandwidth at
102 off-peak times of day. It provides a monitoring daemon which checks
103 bandwidth usage, a scheduling daemon which prioritises downloads to
104 minimise cost, and a tariff library which describes different data
105 plans.
106
107 This package contains scheduling daemon.
108
109 %description scheduled -l pl.UTF-8
110 Mogwai pozwala systemom wykorzystywać mniejszy koszt pobierania danych
111 poza godzinami szczytu. Zawiera demona monitorującego, sprawdzającego
112 wykorzystanie sieci, demona planującego, który określa priorytet
113 pobrań w celu zminimalizowania kosztu oraz bibliotekę taryfikującą,
114 opisującą różne plany danych.
115
116 Ten pakiet zawiera demona planującego.
117
118 %prep
119 %setup -q
120
121 %build
122 %meson build \
123         %{!?with_static_libs:--default-library=shared}
124
125 %ninja_build -C build
126
127 %install
128 rm -rf $RPM_BUILD_ROOT
129
130 %ninja_install -C build
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %post   libs -p /sbin/ldconfig
136 %postun libs -p /sbin/ldconfig
137
138 %pre    scheduled
139 %groupadd -g 337 mogwai-scheduled
140 %useradd -u 337 -d /usr/share/empty -g mogwai-scheduled -c 'Mogwai Scheduling Daemon' mogwai-scheduled
141
142 %post   scheduled
143 %systemd_post mogwai-scheduled.service
144
145 %preun  scheduled
146 %systemd_preun mogwai-scheduled.service
147
148 %postun scheduled
149 %systemd_reload
150 if [ "$1" = "0" ]; then
151         %userremove mogwai-scheduled
152         %groupremove mogwai-scheduled
153 fi
154
155 %files
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_bindir}/mogwai-schedule-client-1
158 %attr(755,root,root) %{_bindir}/mogwai-tariff-0
159 %{_mandir}/man8/mogwai-schedule-client.8*
160 %{_mandir}/man8/mogwai-tariff.8*
161
162 %files libs
163 %defattr(644,root,root,755)
164 %doc AUTHORS README.md
165 %attr(755,root,root) %{_libdir}/libmogwai-schedule-client-0.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/libmogwai-schedule-client-0.so.0
167 %attr(755,root,root) %{_libdir}/libmogwai-tariff-0.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/libmogwai-tariff-0.so.0
169
170 %files devel
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/libmogwai-schedule-client-0.so
173 %attr(755,root,root) %{_libdir}/libmogwai-tariff-0.so
174 %{_includedir}/mogwai-schedule-client-0
175 %{_includedir}/mogwai-tariff-0
176 %{_pkgconfigdir}/mogwai-schedule-client-0.pc
177 %{_pkgconfigdir}/mogwai-tariff-0.pc
178
179 %if %{with static_libs}
180 %files static
181 %defattr(644,root,root,755)
182 %{_libdir}/libmogwai-schedule-client-0.a
183 %{_libdir}/libmogwai-tariff-0.a
184 %endif
185
186 %files scheduled
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libexecdir}/mogwai-scheduled1
189 %{systemdunitdir}/mogwai-scheduled.service
190 %{_prefix}/lib/sysusers.d/mogwai-scheduled.conf
191 %{_datadir}/dbus-1/system-services/com.endlessm.MogwaiSchedule1.service
192 %{_datadir}/dbus-1/system.d/com.endlessm.MogwaiSchedule1.conf
193 %{_datadir}/polkit-1/rules.d/com.endlessm.MogwaiSchedule1.rules
194 %{_mandir}/man8/mogwai-scheduled.8*
This page took 0.061434 seconds and 3 git commands to generate.