mms-engine.spec 2.45 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.20
Slava Monich's avatar
Slava Monich committed
4 5 6 7 8 9 10
Release:  1
Group:    Communications/Telephony and IM
License:  GPLv2
URL:      https://github.com/nemomobile/mms-engine
Source0:  %{name}-%{version}.tar.bz2
Requires: dbus
Requires: ofono
11
#Requires: ImageMagick
Slava Monich's avatar
Slava Monich committed
12 13

BuildRequires: python
Slava Monich's avatar
Slava Monich committed
14
BuildRequires: file-devel
15 16
BuildRequires: libpng-devel
BuildRequires: libexif-devel
17
BuildRequires: libjpeg-turbo-devel
Slava Monich's avatar
Slava Monich committed
18 19
BuildRequires: pkgconfig(glib-2.0) >= 2.32
BuildRequires: pkgconfig(libsoup-2.4) >= 2.38
20
BuildRequires: pkgconfig(libwspcodec) >= 2.2
21 22
#BuildRequires: pkgconfig(ImageMagick)
BuildRequires:  pkgconfig(Qt5Gui)
Slava Monich's avatar
Slava Monich committed
23 24 25

%define src mms-engine
%define exe mms-engine
26
%define schema org.nemomobile.mms.sim
Slava Monich's avatar
Slava Monich committed
27 28 29
%define dbusname org.nemomobile.MmsEngine
%define dbusconfig %{_datadir}/dbus-1/system-services
%define dbuspolicy %{_sysconfdir}/dbus-1/system.d
30
%define glibschemas  %{_datadir}/glib-2.0/schemas
Slava Monich's avatar
Slava Monich committed
31 32 33 34 35 36 37 38 39

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

%description
MMS engine

40 41 42 43 44 45 46
%package tools
Summary:    MMS tools
Group:      Development/Tools

%description tools
MMS command line utilities

Slava Monich's avatar
Slava Monich committed
47 48 49 50
%prep
%setup -q -n %{name}-%{version}

%build
51
make -C %{src} KEEP_SYMBOLS=1 MMS_ENGINE_VERSION="%{version}" release
52 53
make -C mms-dump KEEP_SYMBOLS=1 release
make -C mms-send KEEP_SYMBOLS=1 release
Slava Monich's avatar
Slava Monich committed
54 55 56 57 58 59 60

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{dbusconfig}
mkdir -p %{buildroot}%{dbuspolicy}
mkdir -p %{buildroot}%{pushconfig}
61
mkdir -p %{buildroot}%{glibschemas}
62
mkdir -p %{buildroot}%{_prefix}/bin/
Slava Monich's avatar
Slava Monich committed
63 64 65 66
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
67
cp mms-settings-dconf/spec/%{schema}.gschema.xml %{buildroot}%{glibschemas}/
68 69
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
70

71 72 73 74 75 76
%post
glib-compile-schemas %{glibschemas}

%postun
glib-compile-schemas %{glibschemas}

77 78 79
%check
make -C mms-lib/test test

Slava Monich's avatar
Slava Monich committed
80 81
%files
%defattr(-,root,root,-)
82
%config %{glibschemas}/%{schema}.gschema.xml
Slava Monich's avatar
Slava Monich committed
83 84 85 86
%config %{dbuspolicy}/%{dbusname}.conf
%config %{pushconfig}/%{dbusname}.conf
%{dbusconfig}/%{dbusname}.service
%{_sbindir}/%{exe}
87 88 89

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