]> git.pld-linux.org Git - SPECS.git/blob - synce-sync-engine.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / synce-sync-engine.spec
1 # TODO
2 # - move (to private dir) or rename .py files in bindir not to be so generic
3 #
4 # Conditional build:
5 %bcond_without  opensync0_2x    # OpenSync 0.2x (opensync02) plugin
6 %bcond_without  opensync0_3x    # OpenSync 0.3x plugin
7 #
8 Summary:        SynCE - Synchronization engine
9 Summary(pl.UTF-8):      SynCE - silnik synchronizacji
10 Name:           synce-sync-engine
11 Version:        0.16
12 Release:        1
13 License:        GPL v2+
14 Group:          Libraries
15 Source0:        http://downloads.sourceforge.net/synce/%{name}-%{version}.tar.gz
16 # Source0-md5:  92a9b81cba6c820f2639c50d79b6fd0d
17 URL:            http://www.synce.org/
18 BuildRequires:  python
19 BuildRequires:  python-setuptools
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.219
22 BuildRequires:  sed >= 4.0
23 Requires:       python-dbus
24 Requires:       python-libxml2
25 Requires:       python-libxslt
26 Requires:       python-pygobject
27 Requires:       python-pyrapi2 >= 0.12
28 Requires:       python-pyrra >= 0.12
29 Requires:       python-pyrtfcomp >= 1.1
30 Requires:       python-setuptools
31 Requires:       synce-core
32 #Requires:      synce-pywbxml >= 0.1
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 SynCE - Synchronization engine.
37
38 %description -l pl.UTF-8
39 SynCE - silnik synchronizacji.
40
41 %package -n libopensync-plugin-synce
42 Summary:        SynCE plugin for OpenSync framework
43 Summary(pl.UTF-8):      Wtyczka SynCE dla szkieletu OpenSync
44 Group:          Libraries/Python
45 Requires:       %{name} = %{version}-%{release}
46 Requires:       libopensync-plugin-python >= 0.30
47 Requires:       python-opensync >= 1:0.39-7
48
49 %description -n libopensync-plugin-synce
50 SynCE plugin for OpenSync framework.
51
52 %description -n libopensync-plugin-synce -l pl.UTF-8
53 Wtyczka SynCE dla szkieletu OpenSync.
54
55 %package -n libopensync02-plugin-synce
56 Summary:        SynCE plugin for OpenSync 0.2x framework
57 Summary(pl.UTF-8):      Wtyczka SynCE dla szkieletu OpenSync 0.2x
58 Group:          Libraries/Python
59 Requires:       %{name} = %{version}-%{release}
60 Requires:       libopensync02-plugin-python >= 0.20
61 Requires:       python-opensync02 >= 0.20
62
63 %description -n libopensync02-plugin-synce
64 SynCE plugin for OpenSync 0.2x framework.
65
66 %description -n libopensync02-plugin-synce -l pl.UTF-8
67 Wtyczka SynCE dla szkieletu OpenSync 0.2x.
68
69 %prep
70 %setup -q
71
72 # Change python package path to normal on 'tools' folder
73 %{__sed} -i -e "/^sys\.path\.insert(0,/d" tools/*.py
74
75 %build
76 %{__python} setup.py build
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 %{__python} setup.py install \
81         --optimize=2 \
82         --root=$RPM_BUILD_ROOT
83
84 #install -d $RPM_BUILD_ROOT%{_datadir}/libopensync1/python-plugins
85 #install -Dp plugins/synce-opensync-plugin-3x.py $RPM_BUILD_ROOT%{_datadir}/libopensync1/python-plugins
86 install -Dp config/org.synce.SyncEngine.service $RPM_BUILD_ROOT%{_datadir}/dbus-1/services/org.synce.SyncEngine.service
87 install -Dp config/syncengine.conf.xml $RPM_BUILD_ROOT%{_sysconfdir}/syncengine.conf.xml
88
89 # do the job on packaging stage
90 %if %{with opensync0_3x}
91 install -d $RPM_BUILD_ROOT%{_datadir}/libopensync1/python-plugins
92 %{__mv} $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins/synce-opensync-plugin-3x.py* $RPM_BUILD_ROOT%{_datadir}/libopensync1/python-plugins
93 %else
94 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins/synce-opensync-plugin-3x.py*
95 %endif
96 %if %{with opensync0_2x}
97 install -d $RPM_BUILD_ROOT%{_libdir}/opensync/python-plugins
98 %{__mv} $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins/synce-opensync-plugin-2x.py* $RPM_BUILD_ROOT%{_libdir}/opensync/python-plugins
99 %else
100 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins/synce-opensync-plugin-2x.py*
101 %endif
102 %{__rm} $RPM_BUILD_ROOT%{_bindir}/synce-install-plugins.py
103 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins/__init__.py*
104 rmdir $RPM_BUILD_ROOT%{py_sitescriptdir}/plugins
105
106 %{__rm} $RPM_BUILD_ROOT%{_docdir}/sync-engine/org.synce.SyncEngine.service
107 %{__rm} $RPM_BUILD_ROOT%{_docdir}/sync-engine/syncengine.conf.xml
108
109 %py_postclean
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc CHANGELOG
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syncengine.conf.xml
118 %attr(755,root,root) %{_bindir}/clean_partnerships.py
119 %attr(755,root,root) %{_bindir}/configure_bindings.py
120 %attr(755,root,root) %{_bindir}/create_partnership.py
121 %attr(755,root,root) %{_bindir}/delete_partnership.py
122 %attr(755,root,root) %{_bindir}/list_partnerships.py
123 %attr(755,root,root) %{_bindir}/sync-engine
124 %{_datadir}/dbus-1/services/org.synce.SyncEngine.service
125
126 %dir %{py_sitescriptdir}/SyncEngine
127 %{py_sitescriptdir}/SyncEngine/*.py[co]
128 %dir %{py_sitescriptdir}/SyncEngine/formats
129 %{py_sitescriptdir}/SyncEngine/formats/*.py[co]
130 %{py_sitescriptdir}/SyncEngine/formats/*.xsl
131 %dir %{py_sitescriptdir}/SyncEngine/formats/tzutils
132 %{py_sitescriptdir}/SyncEngine/formats/tzutils/*.py[co]
133 %dir %{py_sitescriptdir}/SyncEngine/formats30
134 %{py_sitescriptdir}/SyncEngine/formats30/*.py[co]
135 %{py_sitescriptdir}/SyncEngine/formats30/*.xsl
136 %dir %{py_sitescriptdir}/SyncEngine/formats30/tzutils
137 %{py_sitescriptdir}/SyncEngine/formats30/tzutils/*.py[co]
138 %dir %{py_sitescriptdir}/SyncEngine/wbxml
139 %{py_sitescriptdir}/SyncEngine/wbxml/*.py[co]
140 %{py_sitescriptdir}/sync_engine-%{version}-py*.egg-info
141
142 %if %{with opensync0_2x}
143 %files -n libopensync02-plugin-synce
144 %defattr(644,root,root,755)
145 %{_libdir}/opensync/python-plugins/synce-opensync-plugin-2x.py*
146 %endif
147
148 %if %{with opensync0_3x}
149 %files -n libopensync-plugin-synce
150 %defattr(644,root,root,755)
151 %doc plugins/synce-opensync-plugin-3x.README
152 %{_datadir}/libopensync1/python-plugins/synce-opensync-plugin-3x.py*
153 %endif
This page took 0.626321 seconds and 3 git commands to generate.