Jens Reimann пре 7 година
родитељ
комит
7f8aaffa35
2 измењених фајлова са 47 додато и 2 уклоњено
  1. 2 2
      CMakeLists.txt
  2. 45 0
      open62541.spec

+ 2 - 2
CMakeLists.txt

@@ -459,8 +459,8 @@ add_dependencies(lint open62541)
 
 # export library (either static or shared depending on BUILD_SHARED_LIBS)
 install(TARGETS open62541
-        LIBRARY DESTINATION lib
-        ARCHIVE DESTINATION lib)
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} 
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) 
 # export amalgamated header open62541.h which is generated due to build of open62541-object
 install(FILES ${PROJECT_BINARY_DIR}/open62541.h DESTINATION include)
 

+ 45 - 0
open62541.spec

@@ -0,0 +1,45 @@
+Name:     open62541
+Version:  0.2
+Release:  1%{?dist}
+Summary:  Open 62541
+License:  Mozilla 2.0
+URL:      http://open62541.org
+Source0:  https://github.com/open62541/open62541/archive/v%{version}.tar.gz
+
+BuildRequires: cmake
+
+%description
+Open 62541
+
+%package  devel
+Summary:  Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q
+
+%build
+%cmake .
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libopen62541.so
+%{_libdir}/libopen62541.so.*
+
+%files devel
+%{_includedir}/open62541.h
+
+%changelog
+* Thu Aug 31 2017 Jens Reimann <jreimann@redhat.com> - 0.2-1
+- Initial version of the package