mms-engine.spec 2.83 KB
Newer Older
Slava Monich's avatar
Slava Monich committed
1 2
Name:     mms-engine
Summary:  MMS engine
Slava Monich's avatar
Slava Monich committed
3
Version:  1.0.53
Slava Monich's avatar
Slava Monich committed
4 5 6
Release:  1
Group:    Communications/Telephony and IM
License:  GPLv2
Slava Monich's avatar
Slava Monich committed
7
URL:      https://git.merproject.org/mer-core/mms-engine
Slava Monich's avatar
Slava Monich committed
8 9 10
Source0:  %{name}-%{version}.tar.bz2
Requires: dbus
Requires: ofono
Slava Monich's avatar
Slava Monich committed
11 12
Requires: libsoup >= 2.38
Requires: libwspcodec >= 2.2
13
Requires: libgofono >= 2.0.0
Slava Monich's avatar
Slava Monich committed
14
Requires: libgofonoext >= 1.0.4
Slava Monich's avatar
Slava Monich committed
15
Requires: libglibutil >= 1.0.5
16
#Requires: ImageMagick
Slava Monich's avatar
Slava Monich committed
17 18

BuildRequires: python
Slava Monich's avatar
Slava Monich committed
19
BuildRequires: file-devel
20
BuildRequires: libjpeg-turbo-devel
21 22 23
BuildRequires: pkgconfig(dconf)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libexif)
24
BuildRequires: pkgconfig(gmime-2.6)
Slava Monich's avatar
Slava Monich committed
25 26
BuildRequires: pkgconfig(glib-2.0) >= 2.32
BuildRequires: pkgconfig(libsoup-2.4) >= 2.38
27
BuildRequires: pkgconfig(libwspcodec) >= 2.2
28
BuildRequires: pkgconfig(libgofono) >= 2.0.0
29
BuildRequires: pkgconfig(libgofonoext) >= 1.0.4
30
BuildRequires: pkgconfig(libglibutil) >= 1.0.11
31
BuildRequires:  pkgconfig(Qt5Gui)
Slava Monich's avatar
Slava Monich committed
32
#BuildRequires: pkgconfig(ImageMagick)
Slava Monich's avatar
Slava Monich committed
33 34 35

%define src mms-engine
%define exe mms-engine
36
%define schema org.nemomobile.mms.sim
Slava Monich's avatar
Slava Monich committed
37 38 39
%define dbusname org.nemomobile.MmsEngine
%define dbusconfig %{_datadir}/dbus-1/system-services
%define dbuspolicy %{_sysconfdir}/dbus-1/system.d
40
%define glibschemas  %{_datadir}/glib-2.0/schemas
Slava Monich's avatar
Slava Monich committed
41 42 43 44 45 46 47 48 49

# Activation method:
%define pushconfig %{_sysconfdir}/ofono/push_forwarder.d
#define pushconfig {_sysconfdir}/push-agent
#Requires: push-agent >= 1.1

%description
MMS engine

50 51 52 53 54 55 56
%package tools
Summary:    MMS tools
Group:      Development/Tools

%description tools
MMS command line utilities

Slava Monich's avatar
Slava Monich committed
57 58 59 60
%prep
%setup -q -n %{name}-%{version}

%build
61
make -C %{src} KEEP_SYMBOLS=1 MMS_ENGINE_VERSION="%{version}" SAILFISH=1 release
62 63
make -C mms-dump KEEP_SYMBOLS=1 release
make -C mms-send KEEP_SYMBOLS=1 release
Slava Monich's avatar
Slava Monich committed
64 65 66 67 68 69 70

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{dbusconfig}
mkdir -p %{buildroot}%{dbuspolicy}
mkdir -p %{buildroot}%{pushconfig}
71
mkdir -p %{buildroot}%{glibschemas}
72
mkdir -p %{buildroot}%{_prefix}/bin/
Slava Monich's avatar
Slava Monich committed
73 74 75 76
cp %{src}/build/release/%{exe} %{buildroot}%{_sbindir}/
cp %{src}/%{dbusname}.service %{buildroot}%{dbusconfig}/
cp %{src}/%{dbusname}.dbus.conf %{buildroot}%{dbuspolicy}/%{dbusname}.conf
cp %{src}/%{dbusname}.push.conf %{buildroot}%{pushconfig}/%{dbusname}.conf
77
cp mms-settings-dconf/spec/%{schema}.gschema.xml %{buildroot}%{glibschemas}/
78 79
cp mms-dump/build/release/mms-dump %{buildroot}%{_prefix}/bin/
cp mms-send/build/release/mms-send %{buildroot}%{_prefix}/bin/
Slava Monich's avatar
Slava Monich committed
80

81 82 83 84 85 86
%post
glib-compile-schemas %{glibschemas}

%postun
glib-compile-schemas %{glibschemas}

87 88 89
%check
make -C mms-lib/test test

Slava Monich's avatar
Slava Monich committed
90 91
%files
%defattr(-,root,root,-)
92
%config %{glibschemas}/%{schema}.gschema.xml
Slava Monich's avatar
Slava Monich committed
93 94 95 96
%config %{dbuspolicy}/%{dbusname}.conf
%config %{pushconfig}/%{dbusname}.conf
%{dbusconfig}/%{dbusname}.service
%{_sbindir}/%{exe}
97 98 99

%files tools
%defattr(-,root,root,-)
100 101
%{_prefix}/bin/mms-dump
%{_prefix}/bin/mms-send