rpms/grace/devel grace.desktop,1.1,1.2 grace.spec,1.18,1.19
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Wed Jan 23 09:19:14 UTC 2008
Author: pertusus
Update of /cvs/extras/rpms/grace/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28970
Modified Files:
grace.desktop grace.spec
Log Message:
* Tue Jan 22 2008 Patrice Dumas <pertusus[AT]free.fr> - 5.1.21-5
- don't add the grace fonts to the X server fonts. Instead use the
urw fonts. Regenerate the FontDataBase based on the urw fonts.
- use xdg-utils instead of htmlview.
- use relative links.
- add links to doc and examples in GRACE_HOME to have correct help.
- use debian patch
- clean docs
Index: grace.desktop
===================================================================
RCS file: /cvs/extras/rpms/grace/devel/grace.desktop,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- grace.desktop 9 Jan 2006 16:15:12 -0000 1.1
+++ grace.desktop 23 Jan 2008 09:18:35 -0000 1.2
@@ -2,8 +2,8 @@
Encoding=UTF-8
Name=Grace
Comment=Numerical Data Processing and Visualization Tool
-Exec=/usr/bin/xmgrace
-Icon=grace.png
+Exec=xmgrace
+Icon=grace
Terminal=false
Type=Application
-Categories=Application;Graphics;
+Categories=Graphics;
Index: grace.spec
===================================================================
RCS file: /cvs/extras/rpms/grace/devel/grace.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- grace.spec 28 Sep 2007 23:22:58 -0000 1.18
+++ grace.spec 23 Jan 2008 09:18:35 -0000 1.19
@@ -1,9 +1,9 @@
-%define _x11fontdir %{_datadir}/X11/fonts
-%define catalogue /etc/X11/fontpath.d
+# relative do datadir
+%define type1fontdir fonts/default/Type1
Name: grace
Version: 5.1.21
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Numerical Data Processing and Visualization Tool
License: GPLv2+
@@ -12,17 +12,20 @@
Source0: ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}.png
-Source3: cephes-license.email
-Source4: LICENSE.cephes
+Source3: cephes-license.email
+Source4: LICENSE.cephes
Patch0: %{name}-gracerc-no_auxiliary.diff
-Patch1: %{name}-detect-netcdf.diff
+Patch1: %{name}-detect-netcdf.diff
+Patch2: http://ftp.de.debian.org/debian/pool/main/g/grace/grace_5.1.21-2.diff.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Group: Applications/Engineering
BuildRequires: libjpeg-devel, libpng-devel, netcdf-devel
BuildRequires: zlib-devel, fftw2-devel, t1lib-devel
BuildRequires: xbae-devel, gcc-gfortran, libXmu-devel
-BuildRequires: desktop-file-utils, font-utils
+BuildRequires: desktop-file-utils
+# to be able to generate FontDataBase
+BuildRequires: urw-fonts
%if "%{fedora}" < "5"
BuildRequires: xorg-x11-devel
@@ -30,12 +33,10 @@
BuildRequires: libXpm-devel
%endif
-Requires: nedit
-Requires: htmlview
-%if "%{fedora}" < "8"
-Requires(post): chkfontpath
-Requires(postun): chkfontpath
-%endif
+Requires: nedit
+Requires: xdg-utils
+# /usr/share/fonts/default/Type1/
+Requires: urw-fonts
%description
Grace is a Motif application for two-dimensional data visualization.
@@ -49,8 +50,9 @@
%package devel
Summary: Files needed for grace development
Group: Development/Libraries
-License: LGPL
+License: LGPLv2+
Requires: %{name} = %{version}-%{release}
+Provides: %{name}-static = %{version}-%{release}
%description devel
Install these files if you need to compile software that requires grace.
@@ -61,16 +63,20 @@
%patch0
%patch1
+# avoid duplicating debian patch
+%patch2 -p1
+patch -p0 < debian/patches/tmpnam_to_mkstemp.diff
+
# remove stripping option to have meaningfull debuginfo packages
sed -i -e 's/^\(.*INSTALL_PROGRAM.*\) -s /\1 /' */Makefile
-rm -rf Xbae
+rm -rf Xbae T1lib
%build
cp %{SOURCE3} %{SOURCE4} .
%configure \
--enable-editres \
--with-editor=nedit \
- --with-helpviewer="htmlview file://%{_docdir}/%{name}-%{version}/%s" \
+ --with-helpviewer="xdg-open %s" \
--with-printcmd="lpr" \
--enable-grace-home=%{_datadir}/%{name} \
--disable-pdfdrv \
@@ -91,7 +97,7 @@
mkdir -pm 755 \
%{buildroot}%{_bindir} \
%{buildroot}%{_includedir} \
- %{buildroot}%{_libdir} \
+ %{buildroot}%{_libdir} \
%{buildroot}%{_datadir}/icons/hicolor/48x48/apps \
%{buildroot}%{_datadir}/applications \
%{buildroot}%{_mandir}/man1 \
@@ -103,52 +109,84 @@
pushd %{buildroot}%{_datadir}/%{name}
install -pm 755 bin/* %{buildroot}%{_bindir}/
rm -rf bin
-ln -s %{_bindir} bin
-install -pm 755 lib/* %{buildroot}%{_libdir}/
+#ln -s %{_bindir} bin
+ln -s ../../bin bin
+cp -p lib/* %{buildroot}%{_libdir}/
rm -rf lib
-ln -s %{_libdir} lib
+#ln -s %{_libdir} lib
+ln -s ../../%_lib lib
install -pm 644 include/* %{buildroot}%{_includedir}/
rm -rf include
-ln -s %{_includedir} include
+#ln -s %{_includedir} include
+ln -s ../../include include
+# use fonts from type1fontdir
+rm -rf fonts/type1
+ln -s ../../%{type1fontdir} fonts/type1
+mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name}
+#ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
+ln -s ../../../../%{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
+
+# regenerate %{_sysconfdir}/%{name}/FontDataBase based on what is in
+# type1fontdir and original FontDataBase content
+FontDataBaseFile=%{buildroot}%{_sysconfdir}/%{name}/FontDataBase
+rm -f $FontDataBaseFile.tmp
+for file in %{_datadir}/%{type1fontdir}/*.pfb; do
+ base=`basename $file .pfb`
+ alias=
+ if grep -qs $base $FontDataBaseFile; then
+ # keep original aliases if the exist
+ grep $base $FontDataBaseFile >> $FontDataBaseFile.tmp
+ else
+ # no original alias case. Use FullName from afm file and change space to -
+ if [ -f %{_datadir}/%{type1fontdir}/$base.afm ]; then
+ alias=`grep '^FullName' %{_datadir}/%{type1fontdir}/$base.afm | sed 's/^FullName *//' | sed 's/ *$//' | sed 's/ /-/g'`
+ fi
+ [ "z$alias" = 'z' ] && alias=$base
+ echo "$alias $alias $base.pfb" >> $FontDataBaseFile.tmp
+ fi
+done
+fontcount=`wc -l $FontDataBaseFile.tmp`
+echo $fontcount | sed 's:%{buildroot}.*::' > $FontDataBaseFile
+cat $FontDataBaseFile.tmp >> $FontDataBaseFile
+rm $FontDataBaseFile.tmp
+
install -pm 644 doc/*.1 %{buildroot}%{_mandir}/man1/
# doc and example directories are removed from GRACE_HOME and put in %doc
rm -rf doc
+#ln -s %{_docdir}/%{name}-%{version}/doc doc
+ln -s ../doc/%{name}-%{version}/doc doc
rm -rf examples
-# the convcal source file shouldn't appear in %doc, it is removed here
+#ln -s %{_docdir}/%{name}-%{version}/examples examples
+ln -s ../doc/%{name}-%{version}/examples examples
+# the convcal source file shouldn't be installed, it is removed here
rm -f auxiliary/convcal.c
# move config files to %{_sysconfdir} and do symlinks
for conf in gracerc templates gracerc.user; do
mv $conf %{buildroot}%{_sysconfdir}/%{name}
- ln -s %{_sysconfdir}/%{name}/$conf $conf
+ #ln -s %{_sysconfdir}/%{name}/$conf $conf
+ ln -s ../../../%{_sysconfdir}/%{name}/$conf $conf
done
-mv fonts/FontDataBase %{buildroot}%{_sysconfdir}/%{name}
-ln -s %{_sysconfdir}/%{name}/FontDataBase fonts/FontDataBase
popd
-mkfontdir %{buildroot}%{_datadir}/%{name}/fonts/type1
+
##
# Desktop stuff
#
install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
-install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
-desktop-file-install --vendor fedora --delete-original \
+desktop-file-install --vendor fedora \
--dir %{buildroot}%{_datadir}/applications \
- --add-category Application \
- --add-category Graphics \
- %{buildroot}%{_datadir}/applications/%{name}.desktop
-
-%if "%{fedora}" >= "8"
-mkdir -p $RPM_BUILD_ROOT%{catalogue}
-ln -sf %{_datadir}/%{name}/type1 $RPM_BUILD_ROOT%{catalogue}/%{name}-type1
-%endif
+ %{SOURCE1}
+
+# clean up docs
+rm -rf __dist_doc
+mkdir __dist_doc
+cp -a doc __dist_doc
+rm __dist_doc/doc/Makefile __dist_doc/doc/*.sgml
%clean
rm -rf %{buildroot}
%post
-%if "%{fedora}" < "8"
-%{_sbindir}/chkfontpath -q -a %{_datadir}/%{name}/fonts/type1
-%endif
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
@@ -156,9 +194,6 @@
%postun
-%if "%{fedora}" < "8"
-%{_sbindir}/chkfontpath -q -r %{_datadir}/%{name}/fonts/type1
-%endif
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
@@ -169,7 +204,7 @@
%defattr(-,root,root,-)
%doc ChangeLog CHANGES COPYRIGHT DEVELOPERS LICENSE README
%doc cephes-license.email LICENSE.cephes
-%doc examples/ doc/
+%doc examples/ __dist_doc/doc/
%config(noreplace) %{_sysconfdir}/%{name}/
%{_bindir}/*
%{_datadir}/%{name}
@@ -178,20 +213,26 @@
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man*/*
-%if "%{fedora}" >= "8"
-%{catalogue}/%{name}-type1
-%endif
%files devel
%defattr(-,root,root,-)
%doc grace_np/LICENSE
%{_includedir}/*
%{_datadir}/%{name}/include
-%{_libdir}/lib*
+%{_libdir}/libgrace_np.a
%{_datadir}/%{name}/lib
%changelog
+* Tue Jan 22 2008 Patrice Dumas <pertusus[AT]free.fr> - 5.1.21-5
+- don't add the grace fonts to the X server fonts. Instead use the
+ urw fonts. Regenerate the FontDataBase based on the urw fonts.
+- use xdg-utils instead of htmlview.
+- use relative links.
+- add links to doc and examples in GRACE_HOME to have correct help.
+- use debian patch
+- clean docs
+
* Fri Sep 28 2007 José Matos <jamatos[AT]fc.up.pt> - 5.1.21-4
- Correctly detect netcdf (signature has changed).
- Add libXmu-devel as BR.
More information about the fedora-extras-commits
mailing list