Browse Source

Merge branch '0.2' into backport/0.2.1

Stefan Profanter 6 years ago
parent
commit
8863a918a8
5 changed files with 70 additions and 3 deletions
  1. 3 0
      .tito/packages/.readme
  2. 5 0
      .tito/tito.props
  3. 4 2
      CMakeLists.txt
  4. 2 1
      doc/conf.py
  5. 56 0
      open62541.spec

+ 3 - 0
.tito/packages/.readme

@@ -0,0 +1,3 @@
+the .tito/packages directory contains metadata files
+named after their packages. Each file has the latest tagged
+version and the project's relative directory.

+ 5 - 0
.tito/tito.props

@@ -0,0 +1,5 @@
+[buildconfig]
+builder = tito.builder.Builder
+tagger = tito.tagger.VersionTagger
+changelog_do_not_remove_cherrypick = 0
+changelog_format = %s (%ae)

+ 4 - 2
CMakeLists.txt

@@ -15,6 +15,8 @@ set(OPEN62541_VER_MINOR 2)
 set(OPEN62541_VER_PATCH 0)
 set(OPEN62541_VER_LABEL "dev") # Appended to the X.Y.Z version format. For example "-rc1" or an empty string
 
+set(LIB_INSTALL_DIR lib CACHE PATH "Installation path of libraries")
+
 # Set OPEN62541_VER_COMMIT
 if(GIT_FOUND)
     execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --tags
@@ -504,8 +506,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)
 

+ 2 - 1
doc/conf.py

@@ -19,6 +19,7 @@
 import sys
 import os
 import shlex
+import sphinx_rtd_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -123,7 +124,7 @@ html_theme = 'sphinx_rtd_theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".

+ 56 - 0
open62541.spec

@@ -0,0 +1,56 @@
+Name:     open62541
+Version:  0.2
+Release:  1%{?dist}
+Summary:  OPC UA implementation
+License:  MPLv2.0
+URL:      http://open62541.org
+Source0:  https://github.com/open62541/open62541/archive/%{name}-%{version}.tar.gz
+
+BuildRequires: cmake, python
+
+%description
+open62541 is a C-based library (linking with C++ projects is possible)
+with all necessary tools to implement dedicated OPC UA clients and servers,
+or to integrate OPC UA-based communication into existing applications.
+
+%package  devel
+Summary:  Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q -n %{name}-%{name}-%{version} # double-name prefix by GitHub
+
+%build
+%cmake -DUA_ENABLE_AMALGAMATION=ON .
+make
+
+%install
+%make_install
+
+# Remove this from the examples installation
+rm examples/CMakeLists.txt
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%license LICENSE
+%doc AUTHORS CHANGELOG README.md
+%{_libdir}/libopen62541.so.*
+
+%files devel
+%license LICENSE LICENSE-CC0
+%{_libdir}/libopen62541.so
+%{_includedir}/open62541.h
+%doc FEATURES.md
+%doc examples/
+
+%changelog
+* Thu Aug 31 2017 Jens Reimann <jreimann@redhat.com> - 0.2-1
+- Initial version of the package
+