On 05/03/11 09:37, Paul Elliott wrote:
Please criticize my spec file for maitreya. Thank You:
(comments are about the lines above them)
----- # norootforbuild
Not necessary under openSUSE/OBS anymore
%define dir_name maitreya6 %define font_dir %{_datadir}/fonts/truetype
Name: maitreya Version: 6.0.2 Release: 1%{?dist} Summary: Software for Vedic and western astrology Group: Productivity/Other License: GPLv2+ URL: http://www.saravali.de Source0: http://downloads.sourceforge.net/project/maitreya/%{dir_name}/maitreya-6.0.2/%{name}-%{version}.tar.bz2 # fix desktop Patch0: maitreya-desktop.patch # reorder the build order to prevent errors when using gcc --as-needed switch Patch1: maitreya-fix_lib_order.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
#opensuse 11.4 and better wants wxWidgets-wxcontainer-devel all others wxGTK- devel %if 0%{?suse_version} >= 1140 BuildRequires: wxWidgets-wxcontainer-devel %else BuildRequires: wxGTK-devel %endif
I think you need to follow the instructions here for openSUSE >= 11.4 http://lists.opensuse.org/opensuse-factory/2011-01/msg00213.html especially the bit about %wx_requires
#let build system find dependancies. #Requires: wxGTK,wxBase
#mandrivia needs libfontconfig %if 0%{?mdkversion} BuildRequires: libfontconfig-devel BuildRequires: libfontconfig %endif
#to verifiy desktop file. BuildRequires: desktop-file-utils
#suse checks for dups and the desktop file %if 0%{?suse_version} || 0%{?sles_version} BuildRequires: fdupes BuildRequires: update-desktop-files #suse is a lang package which must be recommended. Recommends: %{name}-lang = %{version} %lang_package %endif
%description Free software for western and Vedic astrology (Jyotish). Supports classical Vedic astrology, KP system and parts of Jaimini system. Western part includes Uranian astrology. Platforms: Win32, Linux and UNIX.
#normal setup %prep %setup -q %patch0 -p1 %patch1
%build #autoreconf needed because of reorder patch. autoreconf -fi %configure make %{?_smp_mflags}
%install make install DESTDIR=$RPM_BUILD_ROOT
%make_install (or on older openSUSE, %makeinstall) is available for this
#find lang is needed because of reasons in #http://fedoraproject.org/wiki/Packaging/Guidelines#Why_do_we_need_to_use_.25... %find_lang %{dir_name}
%if 0%{?suse_version} || 0%{?sles_version} # check desktop fits suse specs %suse_update_desktop_file %{dir_name}
%endif
#check the desktop file. desktop-file-validate %{buildroot}/%{_datadir}/applications/%{dir_name}.desktop
%if 0%{?suse_version} || 0%{?sles_version} #if suse do fdupes to detect duplicates. %fdupes -s %{buildroot} %endif
%clean rm -rf $RPM_BUILD_ROOT
Not needed under openSUSE anymore
%if 0%{?suse_version} || 0%{?sles_version} #if suse reconfigure for fonts. %post %run_permissions %run_suseconfig_fonts
%postun %run_suseconfig_fonts
%files %else %files -f %{dir_name}.lang %endif %defattr(-,root,root,-) %doc COPYING README NEWS INSTALL AUTHORS ChangeLog %{_bindir}/*
Better to specify these files more explicitly
%{_datadir}/applications/%{dir_name}.desktop %{font_dir}
Do you really need to own this? It's already owned by many different font packages. If it really is necessary, it would make more sense to me to make explicit what fonts are installed try %dir %{font_dir} %{font_dir}/maitreya.ttf (or whatever fonts are included)
%{_datadir}/%{dir_name} %{_datadir}/pixmaps/maitreya.xpm
%if 0%{?suse_version} || 0%{?sles_version} %files lang -f %{dir_name}.lang %defattr(-,root,root,-) %endif
Why do you need the -lang package separate only on openSUSE?
%changelog
Regards, Tejas -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org