diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 8bf6a2cb4938d12873dc6e1728f6f0d2cccbdaff..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# libyang - -#### Description -YANG data modeling language library - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 3cf6cc64bd9e807f36b07c443a7dd72f6aa6b2ca..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# libyang - -#### 介绍 -YANG data modeling language library - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/libyang-1.0.184-doc.patch b/libyang-1.0.184-doc.patch new file mode 100644 index 0000000000000000000000000000000000000000..53a1b69c327883c1dc6641b8c113252eec615ca1 --- /dev/null +++ b/libyang-1.0.184-doc.patch @@ -0,0 +1,19 @@ +commit 66db639f2c6c1b9dda8cf18e2a212f160b268a3b +Author: Tomas Korbar +Date: Thu Jul 23 09:35:56 2020 +0200 + + Search for libyang.h in build directory + +diff --git a/Doxyfile.in b/Doxyfile.in +index 2534da3..272248e 100644 +--- a/Doxyfile.in ++++ b/Doxyfile.in +@@ -781,7 +781,7 @@ WARN_LOGFILE = + # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING + # Note: If this tag is empty the current directory is searched. + +-INPUT = @CMAKE_BINARY_DIR@/src/libyang.h \ ++INPUT = ./build/src/libyang.h \ + ./src/tree_data.h \ + ./src/tree_schema.h \ + ./src/extensions.h \ diff --git a/libyang-1.0.184.tar.gz b/libyang-1.0.184.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7043d39b45eb493ff99e67b4f6bee6c4e5d8e8ec Binary files /dev/null and b/libyang-1.0.184.tar.gz differ diff --git a/libyang.spec b/libyang.spec new file mode 100644 index 0000000000000000000000000000000000000000..8b0b0951997e94a5473e94e68562af45ad5eeb6b --- /dev/null +++ b/libyang.spec @@ -0,0 +1,130 @@ +%global debug_package %{nil} +Name: libyang +Version: 1.0.184 +Release: 0 +Summary: YANG data modeling language library +Url: https://github.com/CESNET/libyang +Source: %{url}/archive/%{name}-%{version}.tar.gz +License: BSD + +Patch0: libyang-1.0.184-doc.patch + +Requires: pcre +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: pcre-devel +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: swig >= 3.0.12 +BuildRequires: libcmocka-devel +BuildRequires: python3-devel +BuildRequires: flex +BuildRequires: bison +BuildRequires: graphviz + +%package devel +Summary: Development files for libyang +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pcre-devel + +%package devel-doc +Summary: Documentation of libyang API +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%package -n libyang-cpp +Summary: C++ bindings for libyang +Requires: %{name}%{?_isa} = %{version}-%{release} + +%package -n libyang-cpp-devel +Summary: Development files for libyang-cpp +Requires: libyang-cpp%{?_isa} = %{version}-%{release} +Requires: pcre-devel + +%package -n python3-libyang +Summary: Python3 bindings for libyang +Requires: libyang-cpp%{?_isa} = %{version}-%{release} +%{?python_provide:%python_provide python3-libyang} + +%description -n libyang-cpp +Bindings of libyang library to C++ language. + +%description -n libyang-cpp-devel +Headers of bindings to c++ language. + +%description -n python3-libyang +Bindings of libyang library to python language. + +%description devel +Headers of libyang library. + +%description devel-doc +Documentation of libyang API. + +%description +Libyang is YANG data modeling language parser and toolkit +written (and providing API) in C. + +%prep +%autosetup -n %{name}-%{version} -p1 + +mkdir build && cd build +cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_BUILD_TYPE:String="Package" \ + -DENABLE_LYD_PRIV=ON \ + -DGEN_JAVA_BINDINGS=OFF \ + -DGEN_JAVASCRIPT_BINDINGS=OFF \ + -DGEN_LANGUAGE_BINDINGS=ON \ + -DENABLE_VALGRIND_TESTS=OFF .. + +make +make doc + +%check +ctest --output-on-failure -V %{?_smp_mflags} + +%install +cd build +%{__make} install DESTDIR=%{?buildroot} INSTALL="%{__install} -p" +cd ../ +mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang +cp -r doc/html %{buildroot}/%{_docdir}/libyang/html + +%files +%license LICENSE +%{_bindir}/yanglint +%{_bindir}/yangre +%{_datadir}/man/man1/yanglint.1.gz +%{_datadir}/man/man1/yangre.1.gz +%{_libdir}/libyang.so.1 +%{_libdir}/libyang.so.1.* +%{_libdir}/libyang1 + +%files devel +%{_libdir}/libyang.so +%{_libdir}/pkgconfig/libyang.pc +%{_includedir}/libyang/*.h +%dir %{_includedir}/libyang/ + +%files devel-doc +%{_docdir}/libyang + +%files -n libyang-cpp +%{_libdir}/libyang-cpp.so.1 +%{_libdir}/libyang-cpp.so.1.* + +%files -n libyang-cpp-devel +%{_libdir}/libyang-cpp.so +%{_includedir}/libyang/*.hpp +%{_libdir}/pkgconfig/libyang-cpp.pc +%dir %{_includedir}/libyang/ + +%files -n python3-libyang +%{python3_sitearch}/yang.py +%{python3_sitearch}/_yang.so +%{python3_sitearch}/__pycache__/yang* + +%changelog +* Fri Jul 10 2020 openEuler Buildteam - 1.0.184-0 +- Package init