代码拉取完成,页面将自动刷新
%global debug_package %{nil}
Name: golang-github-vishvananda-netlink
Version: 0
Release: 0.18
Summary: Go netlink library
License: ASL 2.0
URL: https://github.com/vishvananda/netlink
Source0: https://github.com/vishvananda/netlink/archive/f5a6f697a596c788d474984a38a0ac4ba0719e93/netlink-f5a6f69.tar.gz
ExclusiveArch: x86_64 aarch64
BuildRequires: golang
%description
Go implement of netlink library.
%package devel
Summary: Go netlink development library
BuildArch: noarch
BuildRequires: golang(github.com/vishvananda/netns)
Requires: golang(github.com/vishvananda/netns)
Provides: golang(github.com/vishvananda/netlink) = %{version}-%{release}
Provides: golang(github.com/vishvananda/netlink/nl) = %{version}-%{release}
Provides: %{name}-unit-test = %{version}-%{release}
Obsoletes: %{name}-unit-test < %{version}-%{release}
%description devel
This package contains library and tests for application developments using %{name}.
%prep
%autosetup -n netlink-f5a6f697a596c788d474984a38a0ac4ba0719e93
%build
%install
install -d -p %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/
echo "%%dir %%{gopath}/src/github.com/vishvananda/netlink/." >> devel.file-list
for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go") ; do
dirprefix=$(dirname $file)
install -d -p %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/$dirprefix
cp -pav $file %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/$file
echo "%%{gopath}/src/github.com/vishvananda/netlink/$file" >> devel.file-list
while [ "$dirprefix" != "." ]; do
echo "%%dir %%{gopath}/src/github.com/vishvananda/netlink/$dirprefix" >> devel.file-list
dirprefix=$(dirname $dirprefix)
done
done
install -d -p %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/
for file in $(find . -iname "*_test.go") ; do
dirprefix=$(dirname $file)
install -d -p %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/$dirprefix
cp -pav $file %{buildroot}/%{gopath}/src/github.com/vishvananda/netlink/$file
echo "%%{gopath}/src/github.com/vishvananda/netlink/$file" >> devel.file-list
while [ "$dirprefix" != "." ]; do
echo "%%dir %%{gopath}/src/github.com/vishvananda/netlink/$dirprefix" >> devel.file-list
dirprefix=$(dirname $dirprefix)
done
done
sort -u -o devel.file-list devel.file-list
%check
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
go test github.com/vishvananda/netlink/nl
%files devel -f devel.file-list
%license LICENSE
%doc README.md
%dir /usr/share/gocode/src/github.com/vishvananda
%changelog
* Thu Dec 12 2019 Shuaishuai Song <songshuaishuai2@huawei.com> - 0-0.18
- package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。