[Bug 1371627] Review Request: inih - Simple INI file parser library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1371627

Igor Gnatenko <ignatenko@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |POST
              Flags|                            |fedora-review+



--- Comment #6 from Igor Gnatenko <ignatenko@xxxxxxxxxx> ---
Almost good.

--- inih.spec~    2016-08-31 06:56:31.479004801 +0200
+++ inih.spec    2016-08-31 07:04:53.338189890 +0200
@@ -1,3 +1,5 @@
+%global sover 0
+
 Name:     inih
 Version:  36
 Release:  3%{?dist}
@@ -5,7 +7,7 @@

 License:  BSD
 URL:      https://github.com/benhoyt/inih
-Source0: 
https://github.com/benhoyt/inih/archive/r%{version}/%{name}-r%{version}.tar.gz
+Source0:  %{url}/archive/r%{version}/%{name}-r%{version}.tar.gz

 BuildRequires: gcc

@@ -35,32 +37,25 @@

 %build
 gcc -c -fPIC %{optflags} ini.c
-gcc -shared %{?__global_ldflags} -o libinih.so.0.%{version}
-Wl,-soname,libinih.so.0 ini.o
-
+gcc -shared %{?__global_ldflags} -o libinih.so.%{sover}.%{version}
-Wl,-soname,libinih.so.%{sover} ini.o

 %install
-mkdir -p %{buildroot}%{_libdir}
-mkdir -p %{buildroot}%{_includedir}
-install -p -m 644 ini.h %{buildroot}%{_includedir}/ini.h
-install -p -m 755 libinih.so* %{buildroot}%{_libdir}
-ln -s libinih.so.0.%{version} %{buildroot}%{_libdir}/libinih.so.0
-ln -s libinih.so.0.%{version} %{buildroot}%{_libdir}/libinih.so
-
+install -D -p -m 0644 ini.h %{buildroot}%{_includedir}/ini.h
+install -D -p -m 0755 lib%{name}.so.%{sover}.%{version}
%{buildroot}%{_libdir}/lib%{name}.so.%{sover}.%{version}
+ln -s lib%{name}.so.%{sover}.%{version}
%{buildroot}%{_libdir}/lib%{name}.so.%{sover}
+ln -s lib%{name}.so.%{sover}.%{version} %{buildroot}%{_libdir}/lib%{name}.so

 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig

-
 %files
-%doc README.md LICENSE.txt
-%{_libdir}/libinih.so.0.%{version}
-%{_libdir}/libinih.so.0
-
+%license LICENSE.txt
+%doc README.md
+%{_libdir}/lib%{name}.so.%{sover}*

 %files devel
 %{_includedir}/ini.h
-%{_libdir}/libinih.so
-
+%{_libdir}/lib%{name}.so

 %changelog
 * Tue Aug 30 2016 Jan F. Chadima <jfch@xxxxxxxx> - 36-3


You can simplify spec as written above. though marking license by %license is
not optional.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]