Package init

This commit is contained in:
overweight 2019-09-30 10:58:22 -04:00
commit bf491cc2a5
2 changed files with 152 additions and 0 deletions

BIN
libteam-1.27.tar.gz Normal file

Binary file not shown.

152
libteam.spec Normal file
View File

@ -0,0 +1,152 @@
Name: libteam
Version: 1.27
Release: 11
Summary: User-space counterpart library for team network
License: LGPLv2+
URL: http://www.libteam.org
Source: http://www.libteam.org/files/libteam-%{version}.tar.gz
BuildRequires: gcc jansson-devel libdaemon-devel libnl3-devel
BuildRequires: swig python2-devel dbus-devel systemd doxygen
%description
This package is the user-space counterpart for the team network
driver, and provides an API to control them.
%package devel
Summary : The devel for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
Libraries and header files for libteam development
%package -n teamd
Summary: Device control daemon for team network
Requires: %{name} = %{version}-%{release}
%description -n teamd
Team network device control daemon
%package -n teamd-devel
Summary: The devel for teamd
Requires: %{name} = %{version}-%{release}
%description -n teamd-devel
Libraries and header files for teamd development
%package -n network-scripts-teamd
Summary: legacy network service support of teamd
Requires: network-scripts
Supplements: (%{name} and network-scripts)
%description -n network-scripts-teamd
This package provides the ifup and ifdown scripts which
is use with the legacy network service.
%package -n python2-libteam
%python_provide python2-libteam
Summary: Team network device library bindings
Requires: %{name} = %{version}-%{release}
%description -n python2-libteam
Team network device library bindings. This package should
be installed if you want to develop Python programs that
will manipulate team network devices.
%package help
Summary: Document of %{name}
Requires: %{name} = %{version}-%{release}
%description help
This package contains the document of %{name}
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure
make %{?_smp_mflags}
make html
pushd binding/python
python2 ./setup.py build
popd
%install
mkdir -p _tmpdoc1/examples
cp -p examples/*.c _tmpdoc1/examples
mkdir -p _tmpdoc2/examples
cp -p examples/python/*.py _tmpdoc2/examples
chmod -x _tmpdoc2/examples/*.py
%make_install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
install -p teamd/dbus/teamd.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -p teamd/redhat/systemd/teamd@.service $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts
for i in ifup-Team ifdown-Team ifup-TeamPort ifdown-TeamPort; do
install -p -m 755 teamd/redhat/initscripts_systemd/network-scripts/$i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts
done
install -p -m 755 utils/bond2team $RPM_BUILD_ROOT%{_bindir}/bond2team
pushd binding/python
python2 ./setup.py install --root $RPM_BUILD_ROOT -O1
popd
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING
%{_libdir}/libteam.so.*
%{_bindir}/teamnl
%files devel
%{_includedir}/team.h
%{_libdir}/libteam.so
%{_libdir}/pkgconfig/libteam.pc
%{_libdir}/*.a
%{_libdir}/*.la
%files -n teamd
%doc teamd/example_configs teamd/redhat/example_ifcfgs/
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/teamd.conf
%config(noreplace) %attr(644,root,root) %{_unitdir}/teamd@.service
%{_libdir}/libteamdctl.so.*
%{_bindir}/teamd
%{_bindir}/teamdctl
%{_bindir}/bond2team
%files -n teamd-devel
%{_includedir}/teamdctl.h
%{_libdir}/libteamdctl.so
%{_libdir}/pkgconfig/libteamdctl.pc
%files -n network-scripts-teamd
%{_sysconfdir}/sysconfig/network-scripts/ifup-Team
%{_sysconfdir}/sysconfig/network-scripts/ifdown-Team
%{_sysconfdir}/sysconfig/network-scripts/ifup-TeamPort
%{_sysconfdir}/sysconfig/network-scripts/ifdown-TeamPort
%files -n python2-libteam
%{python2_sitearch}/*
%files help
%doc _tmpdoc1/examples
%doc doc/api
%doc _tmpdoc2/examples
%{_mandir}/man1/bond2team.1*
%{_mandir}/man5/teamd.conf.5*
%{_mandir}/man8/teamd.8*
%{_mandir}/man8/teamdctl.8*
%{_mandir}/man8/teamnl.8*
%changelog
* Thu Aug 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.27-11
- Package init