Author: peroyvind
Date: Thu Feb 15 23:03:11 2007
New Revision: 121542
Modified:
packages/cooker/qtparted/current/SPECS/qtparted.spec
Log:
cleanups
- from José Melo <[EMAIL PROTECTED]>
o Create menu entry
o Help with consolehelper to run
Modified: packages/cooker/qtparted/current/SPECS/qtparted.spec
==============================================================================
--- packages/cooker/qtparted/current/SPECS/qtparted.spec (original)
+++ packages/cooker/qtparted/current/SPECS/qtparted.spec Thu Feb 15
23:03:11 2007
@@ -1,5 +1,3 @@
-%define qtdir %_prefix/lib/qt3
-
Name: qtparted
Version: 0.4.5
Release: %mkrel 5
@@ -7,24 +5,26 @@
License: GPL
Group: System/Configuration/Hardware
URL: http://qtparted.sourceforge.net/
-Source: %name-%version.tar.bz2
+Source: %{name}-%{version}.tar.bz2
# parted 1.7.x support, adapted from CVS
#
http://qtparted.cvs.sourceforge.net/qtparted/qtparted-003/qtparted-003/src/qp_fswrap.cpp?r1=1.30&r2=1.32&view=patch
Patch0: qtparted-parted1.7.patch
Patch1: qtparted-0.4.5-fix-automake.patch
-Buildroot: %_tmppath/%name-buildroot
-BuildRequires: e2fsprogs-devel
-BuildRequires: readline-devel
-BuildRequires: libntfs-devel
-BuildRequires: ntfsprogs
-BuildRequires: jfsprogs
-BuildRequires: gpm-devel
-BuildRequires: ncurses-devel
-BuildRequires: libqt-devel
-BuildRequires: parted-devel
-BuildRequires: autoconf2.5
-BuildRequires: automake
-
+Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRequires: e2fsprogs-devel
+BuildRequires: readline-devel
+BuildRequires: libntfs-devel
+BuildRequires: ntfsprogs
+BuildRequires: jfsprogs
+BuildRequires: gpm-devel
+BuildRequires: ncurses-devel
+BuildRequires: libqt-devel
+BuildRequires: parted-devel
+BuildRequires: autoconf2.5
+BuildRequires: automake
+BuildRequires: ImageMagick
+BuildRequires: desktop-file-utils
+Requires: usermode-consoleonly
%description
QTParted is a qt frontend for parted.
@@ -42,44 +42,58 @@
make -f admin/Makefile.common
%build
-PATH=$PATH:%{qtdir}/bin/
-
+export QTLIB="`pkg-config --variable=libdir qt-mt`"
# we miss reiserfsprogs library:
-%configure2_5x \
-%if "%{_lib}" != "lib"
- --enable-libsuffix="%(A=%{_lib}; echo ${A/lib/})" \
-%endif \
- --with-qt-libraries=%{qtdir}/%{_lib} \
- --disable-reiserfs \
- --disable-static \
- --disable-xfs
-
+%configure2_5x --disable-reiserfs \
+ --disable-static \
+ --disable-xfs
%make
%install
+rm -rf %{buildroot}
%makeinstall_std
-mkdir -p $RPM_BUILD_ROOT%_mandir/man1
-install -m644 doc/%name.1 $RPM_BUILD_ROOT%_mandir/man1
-%find_lang %name
+install -m644 doc/%{name}.1 -D %{buildroot}%{_mandir}/man1
+
+desktop-file-install --vendor="" \
+ --remove-category="Application" \
+ --remove-category="QT" \
+ --add-category="Qt" \
+ --add-category="Settings" \
+ --add-category="HardwareSettings" \
+ --add-category="X-MandrivaLinux-System-Configuration-Other" \
+ --dir %{buildroot}%{_datadir}/applnk/System
%{buildroot}%{_datadir}/applnk/System/*
+
+install -m644 data/qtparted_16.png -D %{buildroot}%{_miconsdir}/%{name}.png
+install -m644 data/qtparted_32.png -D %{buildroot}%{_iconsdir}/%{name}.png
+install -m644 data/qtparted_64.png -D %{buildroot}%{_liconsdir}/%{name}.png
+convert -resize 48x48 %{buildroot}%{_liconsdir}/%{name}.png{,}
+
+install -d %{buildroot}%{_bindir}
+ln -sf consolehelper %{buildroot}%{_bindir}/%{name}
+sed -i 's#/usr/sbin/##' %{buildroot}%{_datadir}/applnk/System/%{name}.desktop
+
+%find_lang %{name}
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post
-%_install_info %name
+%_install_info %{name}
%preun
-%_remove_install_info %name
+%_remove_install_info %{name}
-%files -f %name.lang
+%files -f %{name}.lang
%defattr(-,root,root,755)
-%doc COPYING doc/README
-%_datadir/applnk/System/%name.desktop
-%_datadir/pixmaps/%name.xpm
-%_datadir/%name
-%_mandir/man1/*
-%_sbindir/*
-
-
+%doc doc/README
+%{_datadir}/applnk/System/%{name}.desktop
+%{_miconsdir}/%{name}.png
+%{_iconsdir}/%{name}.png
+%{_liconsdir}/%{name}.png
+%{_datadir}/pixmaps/%{name}.xpm
+%{_datadir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%{_sbindir}/*
+%{_bindir}/%{name}