%define name calcchecksum %define version 1.6 %define pre 1 %if %pre %define release %mkrel 0.pre%pre.1 %else %define release %mkrel 1 %endif Summary: Checksum generator Name: %{name} Version: %{version} Release: %{release} License: GPL Group: File tools BuildRequires: kdelibs-devel %if %pre Source: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}-pre%{pre}.tar.bz2 %else Source: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 %endif BuildRoot: %_tmppath/%name-%version-%release-root %description CalcChecksum is a tool for calculating MD5, MD4, CRC32, SHA1 (SHA160), SHA256, RIPE-MD-160, TIGER, HAVAL (128, 160, 192, 224, 256 with 3, 4 or 5 passes) on files, text-strings or hash-lists generated by md5sum or sha1sum. %prep %if %pre %setup -q -n %{name}-%{version}-pre%{pre} %else %setup -q %endif %build %configure2_5x %make %install rm -rf $RPM_BUILD_ROOT %makeinstall # Delete the .desktop file as it's too old school rm -f %{buildroot}%_datadir/applnk/Applications/%{name}.desktop # Make our own instead mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop <<EOF [Desktop Entry] Encoding=UTF-8 Name=CalcChecksum Comment=Checksum calculator Exec=%{_bindir}/%{name} Icon=%{name} Terminal=false Type=Application StartupNotify=true Categories=KDE;QT;FileTransfer;FileTools; EOF %{find_lang} %{name} %post %update_menus %update_icon_cache hicolor %postun %clean_menus %clean_icon_cache hicolor %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root) %doc README BUGS TODO AUTHORS ChangeLog %_bindir/%{name} %_datadir/applications/mandriva-%{name}.desktop %_datadir/apps/konqueror/servicemenus/calcchecksumservicemenu.desktop %_datadir/icons/*/*/apps/%{name}.png %changelog * Sat Jun 30 2007 Adam Williamson <awilliamson@mandriva.com> 1.6-0.pre1.1mdv2008.0 + Revision: 46144 - Import calcchecksum