Skip to content

Commit 096efdf

Browse files
jruzicka-nicmichalvasko
authored andcommitted
rpm UPDATE packaging from Fedora
Fedora package sources: https://src.fedoraproject.org/rpms/libnetconf2
1 parent b468a11 commit 096efdf

2 files changed

Lines changed: 11 additions & 16 deletions

File tree

distro/config/apkg.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name = "libnetconf2"
33
make_archive_script = "distro/scripts/make-archive.sh"
44

55
[upstream]
6-
archive_url = "https://github.com/CESNET/libnetconf2/archive/refs/tags/v{{ version }}.tar.gz"
6+
archive_url = "https://github.com/CESNET/libnetconf2/archive/v{{ version }}/libnetconf2-{{ version }}.tar.gz"
77
version_script = "distro/scripts/upstream-version.sh"
88

99
[apkg]
10-
compat = 1
10+
compat = 2

distro/pkg/rpm/libnetconf2.spec

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ Version: {{ version }}
33
Release: {{ release }}%{?dist}
44
Summary: NETCONF protocol library
55
Url: https://github.com/CESNET/libnetconf2
6-
Source: libnetconf2-%{version}.tar.gz
6+
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
77
License: BSD
88

99
BuildRequires: cmake
10-
BuildRequires: make
1110
BuildRequires: gcc
1211
BuildRequires: libssh-devel
1312
BuildRequires: openssl-devel
@@ -17,6 +16,7 @@ BuildRequires: pkgconfig(libyang) >= 2
1716
Summary: Headers of libnetconf2 library
1817
Conflicts: libnetconf-devel
1918
Requires: %{name}%{?_isa} = %{version}-%{release}
19+
Requires: pkgconfig
2020

2121
%description devel
2222
Headers of libnetconf library.
@@ -28,27 +28,22 @@ servers. NETCONF is the NETwork CONFiguration protocol introduced by IETF.
2828

2929
%prep
3030
%autosetup -p1
31-
mkdir build
3231

3332
%build
34-
cd build
35-
cmake \
36-
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
37-
-DCMAKE_BUILD_TYPE:String="Release" \
38-
-DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
39-
-DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \
40-
..
41-
make
33+
%cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO
34+
%cmake_build
4235

4336
%install
44-
cd build
45-
make DESTDIR=%{buildroot} install
37+
%cmake_install
38+
4639

4740
%files
4841
%license LICENSE
42+
%doc README.md FAQ.md
4943
%{_libdir}/libnetconf2.so.*
5044

5145
%files devel
46+
%doc CODINGSTYLE.md
5247
%{_libdir}/libnetconf2.so
5348
%{_libdir}/pkgconfig/libnetconf2.pc
5449
%{_includedir}/*.h
@@ -57,5 +52,5 @@ make DESTDIR=%{buildroot} install
5752

5853

5954
%changelog
60-
* Tue Oct 12 2021 Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
55+
* {{ now }} Jakub Ružička <jakub.ruzicka@nic.cz> - {{ version }}-{{ release }}
6156
- upstream package

0 commit comments

Comments
 (0)