On Oct 9 2007 03:22, Paul Elliott wrote:
>
>What other flaws can you find?
Run rpmlint.
>%define name skylendar
>%define version 1.7.0
Don't do this. It's horribly redundant.
>Name: %{name}
>Version: %{version}
Just put it in here, and %name/%version is implicitly defined.
Pcakman pkgs also suffers from this macrohyperdefinition disease.
>Release: 3%{?dist}
>Vendor: C. Gros
Wrong place to put vendor in. Should be in the per-user config file.
>License: GPL
>Summary: Astrology software for KDE
>Group: Sciences/Astronomy
>Packager: Paul Elliott
Wrong place to put Packager in.
>BuildRoot: %{_tmppath}/%{name}-%{version}-build
>Source: skylendar-%{version}.tar.bz2
{} for % are not needed (much like {} with $ in shell),
though people seem to be fond of them.
%_tmppath/%name-%version-build suffices.
>Patch: pe.diff
>Autoreqprov: on
Redundant line, autoreqprov is on by default.
>Requires: kdelibs3
Don't do this. Autoreqprov will add libkde.so and the like automatically.
Only add Requires for when you depend on some non-.so files, e.g.
perl modules, etc.
>Requires: postgresql
Same.
>BuildRequires:autoconf automake libtool gcc-c++
The first three are installed by default, so can be removed.
>%if 0%{?mandriva_version}
>BuildRequires: mandrakelinux-create-kde-mdk-menu
>%endif
Obviously, suse ain't mandrive.
>%if 0%{?suse_version}
>#suse here
>
>Requires: postgresql-pl
>Requires: qt3-postgresql
See above.
>
>%else
>%if 0%{?fedora_version}
>#fedora here
>Requires: postgresql-pl
>Requires: qt-postgreSQL
Same.
>%else
>%if 0%{?mandriva_version}
>#mandriva here
>
>Requires: postgresql-plpgsql
>Requires: libqt3-psql
Same.
>
>%else
>#unknown here.
>Requires: postgresql-plpgsql
>Requires: libqt3-psql
Same.
>
>%endif
>%endif
>%endif
Could unstack these %ifs into
%if 0%mandrive
do this
%endif
%if 0%suse
do that
%endif
%if !0%mandrive%suse
do else
%endif
>Autoreqprov: on
Duplicate.
>%build
>export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
CFLAGS/CXXFLAGS is implicitly set to RPM_OPT_FLAGS already if you don't set it.
>./configure --prefix=%{_prefix} \
>%if %{_lib} == lib64
> --enable-libsuffix=64 \
>%endif
Just use %configure. The libsuffix stuff sounds unneeded too.
>make
Want to use
make %{?jobs:-j%jobs}
>%clean
>%__rm -rf %{buildroot}
I never got the point of %__rm when you could just use rm.
>%post
> /sbin/ldconfig;\
> %{_bindir}/installskydb;\
> [ -x /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -a
> %{datadir}/fonts/default/Type1;\
> [ -x /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -a
> %{datadir}/fonts/default/Type1/adobestd35;\
> [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache
>%postun
> /sbin/ldconfig;\
> if [ "$1" = "0" ]; then\
> [ -x /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -r
> %{datadir}/fonts/default/Type1;\
> [ -x /usr/sbin/chkfontpath ] && /usr/sbin/chkfontpath -q -r
> %{datadir}/fonts/default/Type1/adobestd35;\
> [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache\
>fi
Away with the backslashes.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]