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

Re: New package: libnjb



On Mon, 2005-08-01 at 15:02 +0200, Linus Walleij wrote:
> On Fri, 29 Jul 2005, Ralf Corsepius wrote:
> 
> > You should make this spec files more compliant to FE-conventions.
> > Please read http://fedoraproject.org/wiki/PackagingGuidelines
> 
> I have now read and tried my very best to comply with all packaging 
> guidelines and the stuff mentioned in the packaging review guidelines as 
> well. See:
> 
> http://www.df.lth.se/~triad/fedora/libnjb-2.2.1-2.fc4.src.rpm
> 
> Would you approve this package now?

There are still some blocking issues:

- You should either use
Requires(pre): /sbin/ldconfig
Requires(post): /sbin/ldconfig
or 
%pre -p /sbin/ldconfig
%post -p /sbin/ldconfig

- The package must not own %{_libdir}

Besides these, further other minor issues (mostly personal preference)
exist - Let me propose the patch below.

Unless somebody else objects I'd approve the package, then.

Ralf

--- libnjb.spec.orig	2005-08-01 18:10:36.000000000 +0200
+++ libnjb.spec	2005-08-01 18:11:36.000000000 +0200
@@ -1,30 +1,12 @@
-%define name    libnjb
-%define	version	2.2.1
-# The following applies to the release number:
-# Final releases: "1" = release number of final release, version 1
-# Release candidates: "0.RC1" = release candidate 1
-# CVS releases  : "0.yyyymmdd" = prerelease from CVS at date
-#                 "0.yyyymmdd.rh9" = For Redhat 9
-#                 "0.yyyymmdd.fc1" = For fedora core 1
-# Distributions : "1.rh9" = version 1 for redhat 9, release 1
-#                 "1.fc1" = version 1 for fedora core 1, release 1
-%define	release	1%{?dist}
-%define	prefix	/usr
-
-Name:		%{name}
-Version:	%{version}
-Release:	%{release}
-Summary:	A software library for talking to the Creative Nomad Jukeboxes and Dell DJs
+Name:		libnjb
+Version:	2.2.1
+Release:	1%{?dist}
+Summary:	Library for talking to the Creative Nomad Jukeboxes and Dell DJs
 URL:		http://libnjb.sourceforge.net/
-# This shall be System Environment/Libraries for Fedora Core
-#               System/Libraries for Mandrake
 Group:		System Environment/Libraries
-# Group:	System/Libraries
-# Packager:	Ed Welch <ed_welch inbox net>
-Source:		%{name}-%{version}.tar.gz
-BuildRoot:	%{_tmppath}/%{name}-buildroot
+Source:		http://prdownloads.sourceforge.net/libnjb/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 License:	BSD
-Docdir:		%{prefix}/share/doc/%{name}-%{version}
 BuildRequires:	libusb-devel
 BuildRequires:	zlib-devel
 BuildRequires:	ncurses-devel
@@ -46,6 +28,9 @@
 Summary:        Development files for libnjb
 Group:          System Environment/Libraries
 Requires:       %{name} = %{version}
+Requires:	zlib-devel
+Requires:	libusb-devel
+Requires:	ncurses-devel
 # doc subpackage removed in newer releases, and included
 # in the -devel package.
 Provides:	libnjb-doc
@@ -64,43 +49,36 @@
 make
 
 %install
-if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi
-%makeinstall
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR="$RPM_BUILD_ROOT" htmldocdir=%{_defaultdocdir}/%{name}-devel-%{version}/html install
 # install hotplug scripts so they are up to date
-mkdir -p $RPM_BUILD_ROOT/etc/hotplug/usb
-install -m 755 nomadjukebox $RPM_BUILD_ROOT/etc/hotplug/usb
-install -m 644 nomad.usermap $RPM_BUILD_ROOT/etc/hotplug/usb
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb
+install -m 755 nomadjukebox $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb
+install -m 644 nomad.usermap $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb
 
 %clean
-if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi
+rm -rf $RPM_BUILD_ROOT
 
-%post
-/sbin/ldconfig
+%post -p /sbin/ldconfig
 
-%postun
-/sbin/ldconfig
+%postun -p /sbin/ldconfig
 
 %files
 %defattr(-, root, root)
-%dir %{_libdir}
+%doc AUTHORS ChangeLog ChangeLog-old FAQ INSTALL LICENSE HACKING
 %{_libdir}/*.so*
-# No static libs...
-#%{_libdir}/*.a
-%{_libdir}/*.la
-%dir /etc/hotplug/usb
-%config(noreplace) /etc/hotplug/usb/*
+%dir %{_sysconfdir}/hotplug/usb
+%config(noreplace) %{_sysconfdir}/hotplug/usb/*
 
 %files examples
 %defattr(-, root, root)
 %{_bindir}/*
 
 %files devel
-%doc AUTHORS ChangeLog ChangeLog-old FAQ INSTALL LICENSE HACKING
-%dir %{prefix}/share/doc/%{name}-%{version}/html
-%{prefix}/share/doc/%{name}-%{version}/html/*
+%defattr(-, root, root)
+%doc %{_defaultdocdir}/%{name}-devel-%{version}/html
 %{_includedir}/*.h
-# %{_pkgconfigdir}/*.pc
-%dir %{_libdir}/pkgconfig
+%{_libdir}/*.*a
 %{_libdir}/pkgconfig/*.pc
 
 

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