MESSAGE("LIBDIR ${LIB_INSTALL_DIR}")
### Install ###
-INSTALL(TARGETS app-checker DESTINATION lib COMPONENT RuntimeLibraries)
-INSTALL(TARGETS ${DAEMON_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS app-checker DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${DAEMON_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/app-checker.h DESTINATION include/app-checker)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app-checker.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app-checker.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/app-checker-server.h DESTINATION include/app-checker)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app-checker-server.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/app-checker-server.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
Group: System/Libraries
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
-
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
-
BuildRequires: cmake
-
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
%build
-CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=/usr
+%cmake .
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
%make_install
+mkdir -p %{buildroot}/usr/lib/ac-plugins
-%post
-
-/sbin/ldconfig
-mkdir -p /usr/lib/ac-plugins
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%manifest app-checker.manifest
%defattr(-,root,root,-)
-/usr/lib/libapp-checker.so.0
-/usr/lib/libapp-checker.so.0.1.0
+%{_libdir}/libapp-checker.so.0
+%{_libdir}/libapp-checker.so.0.1.0
+/usr/lib/ac-plugins
%files devel
%defattr(-,root,root,-)
-/usr/lib/libapp-checker.so
-/usr/lib/pkgconfig/app-checker.pc
+%{_libdir}/libapp-checker.so
+%{_libdir}/pkgconfig/app-checker.pc
/usr/include/app-checker/app-checker.h
%files server
%manifest app-checker.manifest
%defattr(-,root,root,-)
-/usr/lib/libapp-checker-server.so.0
-/usr/lib/libapp-checker-server.so.0.1.0
+%{_libdir}/libapp-checker-server.so.0
+%{_libdir}/libapp-checker-server.so.0.1.0
%files server-devel
%defattr(-,root,root,-)
-/usr/lib/libapp-checker-server.so
-/usr/lib/pkgconfig/app-checker-server.pc
+%{_libdir}/libapp-checker-server.so
+%{_libdir}/pkgconfig/app-checker-server.pc
/usr/include/app-checker/app-checker-server.h