%define name XCombust %define version 1.0 %define release %mkrel 3 Name: %{name} Summary: An elemental analysis calculator Version: %{version} Release: %{release} Source: %{name}-%{version}.tar.bz2 URL: http://www.oci.unizh.ch/group.pages/hesse/xmolcalc/xcombust.html License: GPL Group: Sciences/Chemistry BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: libforms-devel %description XCombust gives you the %%mass of each element for a given chemical formula. It can also help identify multiples of solvent or contaminant molecules from an incorrect elemental analysis. %prep %setup -q %build make CFLAGS="$RPM_OPT_FLAGS" INCLUDES="-I%{_includedir} -I/usr/X11R6/include/X11" LIBDIR="-L%{_libdir} -L/usr/X11R6/%_lib" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_bindir} cp %name $RPM_BUILD_ROOT/%{_bindir} #menu mkdir -p $RPM_BUILD_ROOT%{_menudir} cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name} ?package(%{name}): command="%{name}" icon="chemistry_section.png" needs="x11" title="XCombust" longtitle="Elemental Analysis" section="Applications/Sciences/Chemistry" xdg="true" EOF mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=XCombust Comment=Elemental Analysis Exec=%{_bindir}/%{name} Icon=chemistry_section Terminal=false Type=Application StartupNotify=true Categories=X-MandrivaLinux-MoreApplications-Sciences-Chemistry;Science;Chemistry; EOF %clean rm -rf $RPM_BUILD_ROOT %post %update_menus %postun %clean_menus %files %defattr(-,root,root) %doc README *.txt %{_bindir}/%name %{_menudir}/%name %{_datadir}/applications/mandriva-%{name}.desktop %changelog * Tue Sep 12 2006 Nicolas Lécureuil <neoclust@mandriva.org> 1.0-3mdv2007.0 - XDG * Tue Mar 21 2006 Lenny Cartier <lenny@mandriva.com> 1.0-2mdk - rebuild * Mon Oct 13 2003 Austin Acton <aacton@yorku.ca> 1.0-1mdk - initial package