-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan Engelhardt wrote:
> On Sep 1 2007 16:22, Paul Elliott wrote:
>> Name:                peless
>> Summary:     Tabbed text browser
>> Version:     1.156
>> Release:     19%{?dist}
>> License:     GPL
>> Group:               Productivity/Text/Utilities
>> Source0:     http://download.berlios.de/peless/%{name}-%{version}.tar.bz2
>> BuildRoot:      %{_tmppath}/%{name}-%{version}-build
>> Packager:    https://developer.berlios.de/projects/peless/
> 
> Get rid of "Packager", "Vendor" and "Distribution"; they are
> provided by the build system (depends on the build system).
> Especially since you are the packager of the rpm, and not peless.

Indeed.
And if you're just using rpmbuild, you can set the packager like this:
echo '%packager John Doe <[EMAIL PROTECTED]>' >> ~/.rpmmacros

>> URL:         https://developer.berlios.de/projects/peless/
>> Autoreqprov:    on
> 
> Autoreqprov is the default already, so this line is redundant.
> 
>> %{?suse_update_config:BuildRequires:autoconf automake libtool}
>> BuildRequires: gtkmm24-devel, gconfmm-devel,  boost-devel = 1.33.1, 
>> libsigc++2-devel, gettext, intltool, gcc-c++
>>
>> %description
>> Peless is a simple text file lister. It only displays files and 
>> never modifies them. It can display multiple files using a tabbed notebook, 
>> display international characters, and search the files for regular 
>> expressions 
>> or literal expressions. Users can choose the fonts used to display files.
> 
> %debug_package is missing. Well, people normally do not need it, but editing
> the specfile is something I would like to avoid, in case it seems necessary.

You *must* add it (good practice).
Furthermore, with %debug_package, rpmbuild will strip the binaries (and
store the debug symbols into the -debuginfo subpackage).

>> %prep
>> %setup -q
>> %{?suse_update_libdir:%{suse_update_libdir}}
>> %{?suse_update_config:%{suse_update_config -f}}

Only use them if really needed as they involved autoreconf -fiv, which
slows down the build considerably.

>> %build
>> CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
>> PKG_CONFIG_PATH=%{_prefix}/%{_lib}/pkgconfig:%{_prefix}/share/pkgconfig \
>>      %configure  --prefix=%{_prefix} --with-boost=/usr \
>>      --with-dtcat=%{?DTCAT:%{DTCAT}}%{!?DTCAT:'Application;Utility;'}
>> CCFLAGS=$RPM_OPT_FLAGS \
>> PKG_CONFIG_PATH=%{_prefix}/%{_lib}/pkgconfig:%{_prefix}/share/pkgconfig \
>>       make %{?_smp_mflags}
> 
> Why is it necessary to set PKG_CONFIG_PATH again? pkgconfig is usually
> configured so that all the usual paths are scanned.

Right, those additions above are useless.

Also, using %{_prefix}/%{_lib} and %{_prefix}/share is wrong (or rather,
not always correct).
Use %{_libdir} and %{_datadir} instead (respectively).

> CCFLAGS? That should probably be CXXFLAGS.
> 
>> %install
>> rm -rf $RPM_BUILD_ROOT
>>
> mkdir "$RPM_BUILD_ROOT" here

Neither. no need to mkdir it.

Do NOT use rm -rf $RPM_BUILD_ROOT because it potentially creates a race
condition.
Just remove that line.

>> make DESTDIR=$RPM_BUILD_ROOT install-strip
> 
> Do not strip, this makes it impossible to build a debug package.
> Also, the build system will strip.

Exactly, or %debug_package takes care of it.

Also, rather use the macro %makeinstall, which does this:
%__make DESTDIR="%{buildroot}" install

>> %clean
>> rm -rf $RPM_BUILD_ROOT

%__rm -rf "%{buildroot}"
(but I'm being pedantic here ;D)

>> %files
>> %defattr(-, root, root)
>> %doc AUTHORS COPYING ChangeLog NEWS README INTERNATIONALIZATION
>> %{_bindir}/peless
>> %{_datadir}/applications/%{name}.desktop
>> %{_datadir}/pixmaps/%{name}.png
>> %{_datadir}/pixmaps/%{name}.xpm
>> %_mandir/man1/peless.1.*
> 
> A lot of { } are superfluous. For example,
> %_datadir/pixmaps/%name.xpm
> would suffice.

Yes and no. Personally, I like to use %{} for "variables" and just % for
"commands". It's a matter of taste and style. Wouldn't say they're
superfluous as they certainly don't harm readability.

cheers
- --
  -o) Pascal Bleser     http://linux01.gwdg.de/~pbleser/
  /\\ <[EMAIL PROTECTED]>       <[EMAIL PROTECTED]>
 _\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFG2eVRr3NMWliFcXcRAvS5AJ9SwZdBSTP99VPwgouxG7LEpDpO3wCfeH1G
eIVmPwMk3JsD/ijmop+MGFU=
=3xbn
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to