2 Summary: VPN service library in TIZEN C API
8 Source0: %{name}-%{version}.tar.gz
9 Source1: vpnsvc-daemon.service
10 Source2: org.tizen.vpnsvc.service
11 Source3: dbus-vpnsvc-daemon.conf
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(dbus-glib-1)
15 BuildRequires: pkgconfig(dbus-1)
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(capi-base-common)
18 BuildRequires: pkgconfig(capi-appfw-application)
19 BuildRequires: pkgconfig(capi-appfw-package-manager)
20 BuildRequires: pkgconfig(capi-appfw-app-manager)
21 BuildRequires: pkgconfig(capi-system-info)
22 BuildRequires: pkgconfig(cynara-client)
23 BuildRequires: pkgconfig(cynara-creds-gdbus)
24 BuildRequires: pkgconfig(cynara-session)
25 Requires(post): /sbin/ldconfig
26 Requires(postun): /sbin/ldconfig
29 capi-vpn-service framework, service
31 %package -n capi-vpnsvc
32 Summary: VPN service library in TIZEN C API
33 Group: Development/Libraries
34 #Requires: capi-vpnsvc
36 %description -n capi-vpnsvc
37 capi-vpnsvc CAPI package
39 %package -n capi-vpnsvc-devel
40 Summary: VPN service library in TIZEN C API (Development)
41 Group: Development/Libraries
43 %description -n capi-vpnsvc-devel
44 capi-vpnsvc CAPI devel package
46 %package -n vpnsvc-test
48 Group: Development/Libraries
50 %description -n vpnsvc-test
53 %package -n vpnsvc-daemon
54 Summary: Vpnsvc daemon
55 Group: Development/Libraries
57 Requires(preun): systemd
58 Requires(post): systemd
59 Requires(postun): systemd
61 %description -n vpnsvc-daemon
68 %if 0%{?sec_build_binary_debug_enable}
69 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
70 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
71 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
74 %if 0%{?tizen_build_binary_release_type_eng}
75 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
76 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
77 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
80 export LDFLAGS+="-Wl,--rpath=%{_libdir}"
82 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
83 %cmake . -DVERSION=%{version} \
84 -DFULLVER=%{version} \
85 -DMAJORVER=${MAJORVER} \
86 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:RELEASE} \
87 -DTIZEN_ENGINEER_MODE=%{?tizen_build_binary_release_type_eng:1}%{!?tizen_build_binary_release_type_eng:0} \
88 -DCMAKE_VERBOSE_MAKEFILE=ON \
89 -DLIB_INSTALL_DIR=%{_libdir}
96 mkdir -p %{buildroot}/%{_datadir}/license
97 cp LICENSE %{buildroot}/%{_datadir}/license/capi-vpnsvc
98 #cp LICENSE.APLv2 %{buildroot}/usr/share/license/fpasmtztransport
101 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
102 install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dbus-1/system.d/vpnsvc-daemon.conf
103 mkdir -p %{buildroot}%{_libdir}/systemd/system
104 install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/vpnsvc-daemon.service
105 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
106 install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/dbus-1/system-services/org.tizen.vpnsvc.service
112 ln -s %{_libdir}/libcapi-vpnsvc.so.0 %{_libdir}/libcapi-vpnsvc.so
117 systemctl daemon-reload
120 %files -n vpnsvc-daemon
121 %manifest daemon/vpnsvc-daemon.manifest
122 %attr(0755,root,root) %{_bindir}/vpnsvc-daemon
123 %defattr(-,root,root,-)
124 %{_sysconfdir}/dbus-1/system.d/*.conf
125 %{_libdir}/systemd/system/vpnsvc-daemon.service
126 %{_datadir}/dbus-1/system-services/org.tizen.vpnsvc.service
128 %files -n capi-vpnsvc
129 %manifest framework/capi-vpnsvc.manifest
130 %{_libdir}/libcapi-vpnsvc.so.*
131 %{_datadir}/license/capi-vpnsvc
133 %files -n capi-vpnsvc-devel
135 %{_libdir}/pkgconfig/capi-vpnsvc.pc
136 %{_libdir}/libcapi-vpnsvc.so
138 %files -n vpnsvc-test
139 %manifest test/vpnsvc-test.manifest
140 /usr/sbin/vpnsvc-test