switch to building shared library instead of static

This commit is contained in:
Chris Leech 2017-04-12 14:54:25 -07:00
parent 5e3633e4cb
commit a67b480ca2

View File

@ -1,6 +1,6 @@
Name: isns-utils Name: isns-utils
Version: 0.97 Version: 0.97
Release: 2%{?dist} Release: 3%{?dist}
Summary: The iSNS daemon and utility programs Summary: The iSNS daemon and utility programs
Group: System Environment/Daemons Group: System Environment/Daemons
@ -21,11 +21,17 @@ and iSNS client tools. The Internet Storage Name Service (iSNS) protocol
allows automated discovery, management and configuration of iSCSI and allows automated discovery, management and configuration of iSCSI and
Fibre Channel devices (using iFCP gateways) on a TCP/IP network. Fibre Channel devices (using iFCP gateways) on a TCP/IP network.
%package libs
Group: Development/Libraries
Summary: Shared library files for iSNS
%description libs
Shared library files for iSNS
%package devel %package devel
Group: Development/Libraries Group: Development/Libraries
Summary: Development files for iSNS Summary: Development files for iSNS
Provides: %{name}-static = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel %description devel
Development files for iSNS Development files for iSNS
@ -36,15 +42,16 @@ Development files for iSNS
%build %build
%configure %configure --enable-shared --disable-static
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
sed -i -e 's|-m 555|-m 755|' Makefile
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
make install_hdrs DESTDIR=%{buildroot} make install_hdrs DESTDIR=%{buildroot}
make install_lib DESTDIR=%{buildroot} make install_lib DESTDIR=%{buildroot}
chmod 755 %{buildroot}%{_sbindir}/isns*
chmod 755 %{buildroot}%{_libdir}/libisns.so.0
rm %{buildroot}%{_unitdir}/isnsd.service rm %{buildroot}%{_unitdir}/isnsd.service
rm %{buildroot}%{_unitdir}/isnsd.socket rm %{buildroot}%{_unitdir}/isnsd.socket
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service
@ -73,6 +80,11 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service
/bin/systemctl try-restart isnsd.service >/dev/null 2>&1 || : /bin/systemctl try-restart isnsd.service >/dev/null 2>&1 || :
%post -n %{name}-libs -p /sbin/ldconfig
%postun -n %{name}-libs -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING README %doc COPYING README
@ -84,17 +96,23 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service
%{_unitdir}/isnsd.service %{_unitdir}/isnsd.service
%dir %{_sysconfdir}/isns %dir %{_sysconfdir}/isns
%dir %{_var}/lib/isns %dir %{_var}/lib/isns
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/isns/* %config(noreplace) %{_sysconfdir}/isns/*
%files libs
%defattr(-,root,root,-)
%{_libdir}/libisns.so.0
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{_includedir}/libisns %dir %{_includedir}/libisns
%{_includedir}/libisns/*.h %{_includedir}/libisns/*.h
%{_libdir}/libisns.a %{_libdir}/libisns.so
%changelog %changelog
* Wed Apr 12 2017 Chris Leech <cleech@redhat.com> - 0.97-3
- switch to building as a shared library instead of static
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.97-2 * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.97-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild