Package init
This commit is contained in:
parent
e8cf0cc2cd
commit
1df9bb13c8
85
lxc.spec
85
lxc.spec
@ -1,5 +1,5 @@
|
|||||||
%global with_seccomp 1
|
%global with_seccomp 1
|
||||||
%global _release 20190926
|
%global _release 20191105
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: lxc
|
Name: lxc
|
||||||
@ -307,7 +307,7 @@ This package contains documentation for lxc for creating containers.
|
|||||||
%patch9124 -p1
|
%patch9124 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-distro=fedora --enable-doc --enable-api-docs \
|
%configure --enable-doc --enable-api-docs \
|
||||||
--disable-silent-rules --docdir=%{_pkgdocdir} --disable-rpath \
|
--disable-silent-rules --docdir=%{_pkgdocdir} --disable-rpath \
|
||||||
--disable-static --disable-apparmor --enable-selinux \
|
--disable-static --disable-apparmor --enable-selinux \
|
||||||
%if 0%{?with_seccomp}
|
%if 0%{?with_seccomp}
|
||||||
@ -319,21 +319,21 @@ This package contains documentation for lxc for creating containers.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%{make_install}
|
%{make_install}
|
||||||
mkdir -p %{buildroot}%{_sharedstatedir}/lxc
|
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
|
||||||
|
|
||||||
for file in $(find %{buildroot}/usr/bin/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
|
for file in $(find %{buildroot}/usr/bin/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
|
||||||
do
|
do
|
||||||
strip --strip-debug ${file}
|
strip --strip-debug ${file}
|
||||||
chrpath -d ${file}
|
chrpath -d ${file}
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $(find %{buildroot}/usr/sbin/* -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
|
for file in $(find %{buildroot}/usr/sbin/* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
|
||||||
do
|
do
|
||||||
strip --strip-debug ${file}
|
strip --strip-debug ${file}
|
||||||
chrpath -d ${file}
|
chrpath -d ${file}
|
||||||
done
|
done
|
||||||
|
|
||||||
for file in $(find %{buildroot}/usr/libexec/lxc/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
|
for file in $(find %{buildroot}/usr/libexec/lxc/lxc-* -type f -exec file {} ';' | grep "\<ELF\>" | grep -vE "*\.static" | awk -F ':' '{print $1}')
|
||||||
do
|
do
|
||||||
strip --strip-debug ${file}
|
strip --strip-debug ${file}
|
||||||
chrpath -d ${file}
|
chrpath -d ${file}
|
||||||
@ -348,7 +348,7 @@ cp -a AUTHORS README %{buildroot}%{_pkgdocdir}
|
|||||||
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
|
cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/
|
||||||
|
|
||||||
# cache dir
|
# cache dir
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/cache/lxc
|
mkdir -p %{buildroot}%{_localstatedir}/cache/%{name}
|
||||||
|
|
||||||
# remove libtool .la file
|
# remove libtool .la file
|
||||||
rm -rf %{buildroot}%{_libdir}/liblxc.la
|
rm -rf %{buildroot}%{_libdir}/liblxc.la
|
||||||
@ -357,66 +357,57 @@ rm -rf %{buildroot}%{_libdir}/liblxc.la
|
|||||||
make check
|
make check
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{?ldconfig}
|
|
||||||
%systemd_post lxc-net.service
|
|
||||||
%systemd_post lxc.service
|
|
||||||
%systemd_post lxc@.service
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun lxc-net.service
|
|
||||||
%systemd_preun lxc.service
|
|
||||||
%systemd_preun lxc@.service
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%{?ldconfig}
|
|
||||||
%systemd_postun lxc-net.service
|
|
||||||
%systemd_postun lxc.service
|
|
||||||
%systemd_postun lxc@.service
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/lxc-*
|
%{_bindir}/%{name}-*
|
||||||
%{_datadir}/lxc/lxc.functions
|
%{_datadir}/%{name}/%{name}.functions
|
||||||
%dir %{_datadir}/bash-completion
|
%dir %{_datadir}/bash-completion
|
||||||
%dir %{_datadir}/bash-completion/completions
|
%dir %{_datadir}/bash-completion/completions
|
||||||
%{_datadir}/bash-completion/completions/lxc
|
%{_datadir}/bash-completion/completions/lxc
|
||||||
%{_libdir}/liblxc.so
|
%{_libdir}/liblxc.so
|
||||||
%{_libdir}/liblxc.so.*
|
%{_libdir}/liblxc.so.*
|
||||||
%{_libdir}/lxc
|
%{_libdir}/%{name}
|
||||||
%{_libexecdir}/lxc
|
%{_libexecdir}/%{name}
|
||||||
%{_sbindir}/init.lxc
|
%{_sbindir}/init.%{name}
|
||||||
%{_sharedstatedir}/lxc
|
%{_sharedstatedir}/%{name}
|
||||||
%dir %{_sysconfdir}/lxc
|
%{_sbindir}/init.%{name}.static
|
||||||
%config(noreplace) %{_sysconfdir}/lxc/default.conf
|
%dir %{_sysconfdir}/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/lxc
|
%config(noreplace) %{_sysconfdir}/%{name}/default.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/default/%{name}
|
||||||
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%dir %{_pkgdocdir}
|
%dir %{_pkgdocdir}
|
||||||
%{_pkgdocdir}/AUTHORS
|
%{_pkgdocdir}/AUTHORS
|
||||||
%{_pkgdocdir}/README
|
%{_pkgdocdir}/README
|
||||||
%{_unitdir}/lxc.service
|
%{_unitdir}/%{name}.service
|
||||||
%{_unitdir}/lxc@.service
|
%{_unitdir}/%{name}@.service
|
||||||
%{_unitdir}/lxc-net.service
|
%{_unitdir}/%{name}-net.service
|
||||||
%dir %{_localstatedir}/cache/lxc
|
%dir %{_localstatedir}/cache/%{name}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/lxc/*
|
%{_includedir}/%{name}/*
|
||||||
%{_libdir}/pkgconfig/lxc.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%dir %{_datadir}/lxc
|
%dir %{_datadir}/%{name}
|
||||||
%{_datadir}/lxc/hooks
|
%{_datadir}/%{name}/hooks
|
||||||
%{_datadir}/lxc/lxc-patch.py*
|
%{_datadir}/%{name}/lxc-patch.py*
|
||||||
%{_datadir}/lxc/selinux
|
%{_datadir}/%{name}/selinux
|
||||||
%dir %{_datadir}/lxc/templates
|
%dir %{_datadir}/%{name}/templates
|
||||||
%{_datadir}/lxc/templates/lxc-*
|
%{_datadir}/%{name}/templates/lxc-*
|
||||||
%dir %{_datadir}/lxc/config
|
%dir %{_datadir}/%{name}/config
|
||||||
%{_datadir}/lxc/config/*
|
%{_datadir}/%{name}/config/*
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%dir %{_pkgdocdir}
|
%dir %{_pkgdocdir}
|
||||||
%{_pkgdocdir}/*
|
%{_pkgdocdir}/*
|
||||||
%{_mandir}/man1/lxc*
|
%{_mandir}/man1/%{name}*
|
||||||
%{_mandir}/*/man1/lxc*
|
%{_mandir}/*/man1/%{name}*
|
||||||
%{_mandir}/man5/lxc*
|
%{_mandir}/man5/%{name}*
|
||||||
%{_mandir}/man7/lxc*
|
%{_mandir}/man7/%{name}*
|
||||||
%{_mandir}/*/man5/lxc*
|
%{_mandir}/*/man5/%{name}*
|
||||||
%{_mandir}/*/man7/lxc*
|
%{_mandir}/*/man7/%{name}*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user