[opensuse-packaging] Please criticize my spec file for maitreya.
Please criticize my spec file for maitreya. Thank You: ----- # norootforbuild %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 #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 #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 %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}/* %{_datadir}/applications/%{dir_name}.desktop %{font_dir} %{_datadir}/%{dir_name} %{_datadir}/pixmaps/maitreya.xpm %if 0%{?suse_version} || 0%{?sles_version} %files lang -f %{dir_name}.lang %defattr(-,root,root,-) %endif %changelog -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
On Sat, 5 Mar 2011 10:37, Paul Elliott
Please criticize my spec file for maitreya. Thank You: <snip> 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 <snip>
for Source would not the following be better? http://downloads.sourceforge.net/project/%{name}/%{dir_name}/%{name}-%{version}/%{name}-%{version}.tar.bz2 would be less to do for a version / name change. otherwise I haven't found something out of order, but I'm not the expert on specfiles. -- -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
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
On Saturday, March 05, 2011 04:56:16 am Tejas Guruswamy wrote:
make install DESTDIR=$RPM_BUILD_ROOT
%make_install (or on older openSUSE, %makeinstall) is available for this
Will this work on all distros? fedora rh mandravia? ...
rm -rf $RPM_BUILD_ROOT
Not needed under openSUSE anymore
Can I remove this for all distros?? Is it ok to remove this for fedora & mandrivia?
%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?
I did not know if fedora and mandrivia supported this never having seen docs from them refering to it. Will this code work for fedora rh and mandrivia as well?? Thank You for help me I will implement many of your suggestions and investigate the rest. Thank You. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
On Saturday, March 05, 2011 04:56:16 am Tejas Guruswamy wrote:
%clean rm -rf $RPM_BUILD_ROOT
Not needed under openSUSE anymore
But Fedora still requires it. See: http://fedoraproject.org/wiki/Packaging/Guidelines#.25clean
Regards, Tejas
-- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
Hi, Am 05.03.2011 10:37, schrieb Paul Elliott:
#suse checks for dups and the desktop file %if 0%{?suse_version} || 0%{?sles_version}
%if 0%{?suse_version} will be enough. http://de.opensuse.org/Build_Service/Pakete_f%C3%BCr_mehrere_Distributionen#... Cheers Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Chris
-
Paul Elliott
-
Tejas Guruswamy
-
Yamaban