Release version 0.2.0
[platform/core/base/syspopup.git] / packaging / syspopup.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name:           syspopup
5 Summary:        Syspopup package
6 Version:        0.2.0
7 Release:        0
8 Group:          System/Libraries
9 License:        Apache-2.0
10 Source0:        syspopup-%{version}.tar.gz
11 Source1001:     %{name}.manifest
12 Source1002:     %{name}-devel.manifest
13 Source1003:     %{name}-caller.manifest
14 Source1004:     %{name}-caller-devel.manifest
15
16 BuildRequires:  cmake
17 BuildRequires:  pkgconfig(sqlite3)
18 BuildRequires:  pkgconfig(bundle)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(glib-2.0)
21 BuildRequires:  pkgconfig(gio-2.0)
22 %if %{with wayland}
23 BuildRequires:  pkgconfig(ecore-wayland)
24 BuildRequires:  pkgconfig(capi-ui-efl-util)
25 %else
26 %if %{with x}
27 BuildRequires:  pkgconfig(utilX)
28 BuildRequires:  pkgconfig(x11)
29 BuildRequires:  pkgconfig(ecore-x)
30 %endif
31 %endif
32 BuildRequires:  pkgconfig(evas)
33 BuildRequires:  pkgconfig(elementary)
34 BuildRequires:  pkgconfig(libtzplatform-config)
35 BuildRequires:  pkgconfig(aul)
36 BuildRequires:  pkgconfig(capi-system-info)
37 BuildRequires:  pkgconfig(libsmack)
38
39 %define upgrade_script_path /usr/share/upgrade/scripts
40
41 %description
42 syspopup package for popup
43
44 %package devel
45 Summary:    Syspopup development package
46 Group:      System/Libraries
47 Requires:   %{name} = %{version}-%{release}
48
49 %description devel
50 syspopup development package popup
51
52 %package caller
53 Summary:          Syspopup-caller package
54 Group:            System/Libraries
55 Requires:         %{name} = %{version}-%{release}
56 Requires(post):   /sbin/ldconfig
57 Requires(postun): /sbin/ldconfig
58
59 %description caller
60 syspopup-caller package for popup
61
62 %package caller-devel
63 Summary:    Syspopup-caller development package
64 Group:      System/Development
65 Requires:   %{name} = %{version}-%{release}
66
67 %description caller-devel
68 syspopup-caller development package for popup
69
70 %prep
71 %setup -q
72 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
73
74 %build
75
76 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
77 %cmake \
78 %if %{with wayland}
79         -Dwith_wayland=TRUE \
80 %else
81 %if %{with x}
82         -Dwith_x11=TRUE \
83 %endif
84 %endif
85         -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
86         -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
87         -DEXTRA_CFLAGS=-fPIC \
88         -DFULLVER=%{version} \
89         -DMAJORVER=${MAJORVER} \
90         .
91
92 make %{?jobs:-j%jobs}
93
94 %install
95 %make_install
96 mkdir -p %{buildroot}%{_datadir}
97 touch %{buildroot}%{_datadir}/popup_noti_term
98
99 mkdir -p %{buildroot}%{upgrade_script_path}
100 cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
101
102 %post -p /sbin/ldconfig
103
104 %postun -p /sbin/ldconfig
105
106 %post caller -p /sbin/ldconfig
107
108 %postun caller -p /sbin/ldconfig
109
110 %posttrans
111 /usr/bin/sp_initdb
112
113 %files
114 %manifest %{name}.manifest
115 %defattr(-,root,root,-)
116 %{_bindir}/sp_test
117 %{_bindir}/sp_initdb
118 %{_libdir}/libsyspopup.so.*
119 %{_datadir}/popup_noti_term
120 %license LICENSE
121 %{upgrade_script_path}/502.syspopup_upgrade.sh
122
123 %files devel
124 %manifest %{name}-devel.manifest
125 %defattr(-,root,root,-)
126 %{_includedir}/SLP_SYSPOPUP_PG.h
127 %{_includedir}/syspopup.h
128 %{_libdir}/libsyspopup.so
129 %{_libdir}/pkgconfig/syspopup.pc
130
131 %files caller
132 %manifest %{name}-caller.manifest
133 %defattr(-,root,root,-)
134 %{_libdir}/libsyspopup_caller.so.*
135 %license LICENSE
136
137 %files caller-devel
138 %manifest %{name}-caller-devel.manifest
139 %defattr(-,root,root,-)
140 %{_libdir}/libsyspopup_caller.so
141 %{_includedir}/syspopup_caller.h
142 %{_libdir}/pkgconfig/syspopup-caller.pc