%define major 0 %define minor 1 %define patchlevel 1 %define CHECK_ZIGBEE_PRIVILEGE False Name: zigbee-manager Version: %{major}.%{minor}.%{patchlevel} Release: 1 License: Apache-2.0 Summary: ZigBee Daemon Group: System/Network Source0: %{name}-%{version}.tar.gz Source1: org.tizen.zigbee.service Source2: zigbee.conf BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(vconf) %description Description: ZigBee Daemon %package -n zigbee-lib Summary: ZigBee library Group: System/Libraries BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(dlog) %description -n zigbee-lib ZigBee library %package -n zigbee-lib-devel Summary: ZigBee library (devel) Group: System/Libraries Requires: %{name} = %{version} %description -n zigbee-lib-devel ZigBee library (devel) %prep %setup -q chmod 644 %{SOURCE1} cp -a %{SOURCE1} . %if %{CHECK_ZIGBEE_PRIVILEGE} == "True" chmod 644 %{SOURCE2} cp -a %{SOURCE2} . %endif %build cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DVERSION=%{version} \ -DLIB_INSTALL_DIR=%{_libdir} \ -DUNIT_INSTALL_DIR=%{_unitdir} \ make %{?_smp_mflags} %install %make_install # Do not execute daemon on boot time #mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants #ln -s %{_unitdir}/zigbee-daemon.service %{buildroot}%{_unitdir}/multi-user.target.wants/zigbee-daemon.service mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/ mkdir -p %{buildroot}%{_datadir}/dbus-1/system.d/ cp %{SOURCE1} %{buildroot}%{_datadir}/dbus-1/system-services/org.tizen.zigbee.service %if %{CHECK_ZIGBEE_PRIVILEGE} == "True" cp %{SOURCE2} %{buildroot}%{_datadir}/dbus-1/system.d/zigbee.conf %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %manifest zigbee-daemon.manifest %defattr(644,system,system,-) %attr(755,system,system) %{_bindir}/zigbee-daemon %{_unitdir}/zigbee-daemon.service #%{_unitdir}/multi-user.target.wants/zigbee-daemon.service %attr(644,root,root) %{_datadir}/dbus-1/system-services/* %if %{CHECK_ZIGBEE_PRIVILEGE} == "True" %{_datadir}/dbus-1/system.d/zigbee.conf %endif %license LICENSE %files -n zigbee-lib %defattr(644,system,system,-) %{_libdir}/libzigbee-lib.so* %license LICENSE %files -n zigbee-lib-devel %defattr(644,system,system,-) %{_includedir}/zigbee/lib/*.h %{_includedir}/zigbee/common/*.h %{_libdir}/pkgconfig/zigbee-lib.pc %{_libdir}/libzigbee-lib.so