packaging for Tizen & adjust Cmake options accepted/tizen/ivi/20160218.024703 accepted/tizen/mobile/20160122.030025 accepted/tizen/tv/20160122.030118 accepted/tizen/wearable/20160122.030155 submit/tizen/20160119.054212 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000005
authorMyoungJune Park <mj2004.park@samsung.com>
Tue, 19 Jan 2016 02:11:27 +0000 (11:11 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Tue, 19 Jan 2016 02:11:27 +0000 (11:11 +0900)
CMakeLists.txt
packaging/baselibs.conf [new file with mode: 0644]
packaging/jsoncpp.manifest [new file with mode: 0644]
packaging/jsoncpp.spec [new file with mode: 0644]

index 0289704..fc5853c 100644 (file)
@@ -4,14 +4,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
 PROJECT(jsoncpp)
 ENABLE_TESTING()
 
-OPTION(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" ON)
-OPTION(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON)
+OPTION(JSONCPP_WITH_TESTS "Compile and (for jsoncpp_check) run JsonCpp test executables" OFF)
+OPTION(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" OFF)
 OPTION(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF)
 OPTION(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C and ISO C++" ON)
 OPTION(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
 OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF)
-OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
-OPTION(BUILD_STATIC_LIBS "Build jsoncpp_lib static library." ON)
+OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON)
+OPTION(BUILD_STATIC_LIBS "Build jsoncpp_lib static library." OFF)
 
 # Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
 IF(NOT WIN32)
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..97bf453
--- /dev/null
@@ -0,0 +1 @@
+libjsoncpp
diff --git a/packaging/jsoncpp.manifest b/packaging/jsoncpp.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/jsoncpp.spec b/packaging/jsoncpp.spec
new file mode 100644 (file)
index 0000000..69b7483
--- /dev/null
@@ -0,0 +1,83 @@
+%global jsondir json
+
+Name:       jsoncpp
+Version:    1.6.5
+Release:        0
+Summary:    JSON library implemented in C++
+Group:      System Environment/Libraries
+License:    Public Domain or MIT
+URL:        https://github.com/open-source-parsers/jsoncpp
+Source0:    https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source1:        baselibs.conf
+Source1001:     jsoncpp.manifest
+
+BuildRequires:  doxygen cmake
+BuildRequires:  python
+#BuildRequires:  graphviz
+
+%description
+%{name} is an implementation of a JSON (http://json.org) reader and writer in
+C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format.
+It is easy for humans to read and write. It is easy for machines to parse and
+generate.
+
+
+%package devel
+Summary:    Development headers and library for %{name}
+Group:      Development/Libraries
+Requires:   %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the development headers and library for %{name}.
+
+
+%package doc
+Summary:    Documentation for %{name}
+Group:      Documentation
+BuildArch:  noarch
+
+%description doc
+This package contains the documentation for %{name}
+
+
+%prep
+%setup -q -n %{name}-%{version}
+cp %{SOURCE1001} .
+
+
+
+%build
+%cmake -DBUILD_STATIC_LIBS=OFF .
+make %{?_smp_mflags}
+# Build the doc
+python doxybuild.py --doxygen %{_bindir}/doxygen
+
+#%check
+# Tests are run automatically in the build section
+# ctest -V %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+
+mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+for f in AUTHORS LICENSE NEWS.txt README.md ; do
+    install -p -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name}
+done
+install -p -m 0644 dist/doxygen/*/*.{html,png} $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%{_docdir}/%{name}/
+%exclude %{_docdir}/%{name}/html
+%{_libdir}/lib%{name}.so.*
+
+%files devel
+%{_libdir}/lib%{name}.so
+%{_includedir}/%{jsondir}/
+%{_libdir}/pkgconfig/jsoncpp.pc
+
+%files doc
+%{_docdir}/%{name}/
+