gnumeric.spec.in 5.77 KB
Newer Older
1 2
# This file is basically not maintained.  Use as inspiration only.

3 4
%define  RELEASE 1
%define  rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
5

6 7 8 9 10 11 12 13
Name:             gnumeric
Epoch:            %epoch
Version:          @VERSION@
Release:          %rel
Summary:          Spreadsheet program for GNOME
Group:            Applications/Productivity
License:          GPLv2
URL:              http://www.gnome.org/gnumeric/
Morten Welinder's avatar
Morten Welinder committed
14
Source:           ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.11/%{name}-%{version}.tar.bz2
15
BuildRoot:        %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root
16
BuildRequires:    goffice-devel >= 0.10.9
17
BuildRequires:    libgsf-devel >= 1.14.24
18
BuildRequires:    libxml-2.0-devel >= 2.4.12
19
BuildRequires:    glib-2.0-devel >= 2.38.0
20
BuildRequires:    pango-devel >= 1.24.0
21 22 23 24 25 26
BuildRequires:    scrollkeeper
Requires:         scrollkeeper hicolor-icon-theme
Requires(pre):    GConf2
Requires(post):   /sbin/ldconfig GConf2 scrollkeeper
Requires(preun):  GConf2
Requires(postun): /sbin/ldconfig scrollkeeper
27 28

%description
29 30
This is Gnumeric, a spreadsheet for GNOME.  It aims to be a drop in
replacement for proprietary spreadsheets.  It provides import/export from
31 32 33 34 35 36 37 38 39 40
MS Excel files and many other formats (odf, csv, latex, xbase, applix, quattro pro,
planperfect).



%package devel
Summary: Files necessary to develop gnumeric-based applications
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{PACKAGE_VERSION}-%{release}
Requires: pkgconfig
41

42 43 44 45
%description devel
Gnumeric is a spreadsheet program for the GNOME GUI desktop
environment. The gnumeric-devel package includes files necessary to
develop gnumeric-based applications.
46 47


48 49 50 51 52 53 54 55 56 57 58 59
%package plugins-extras
Summary:          Files necessary to develop gnumeric-based applications
Group:            Applications/Productivity
Requires:         %{name} = %{epoch}:%{PACKAGE_VERSION}-%{release}
Requires:         perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description plugins-extras
This package contains the following additional plugins for gnumeric:
* gda and gnomedb plugins:
  Database functions for retrieval of data from a database.
* perl plugin:
  This plugin allows writing of plugins in perl
60

61

62
%prep
63
%setup -q
64 65

%build
66
%configure --enable-ssindex
67
make %{?_smp_mflags}
68

69

70
%install
71 72 73

rm -rf $RPM_BUILD_ROOT

74
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
75 76
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
77

78
%find-lang %{name}
79

80 81 82 83 84 85
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor gnumeric --delete-original                  \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications                         \
  --add-category Office                                                 \
  --add-category Spreadsheet                                            \
  $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
86

87 88 89 90
#put icon in the proper place
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps
mv $RPM_BUILD_ROOT/usr/share/pixmaps/gnome-%{name}.png \
  $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/%{name}.png
91

92 93 94
#remove unused mime type icons
rm $RPM_BUILD_ROOT/%{_datadir}/pixmaps/gnome-application-*.png
rm $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}/gnome-application-*.png
95

96 97 98
#remove spurious .ico thing
rm $RPM_BUILD_ROOT/usr/share/pixmaps/win32-%{name}.ico
rm $RPM_BUILD_ROOT/usr/share/pixmaps/%{name}/win32-%{name}.ico
Arturo Tena's avatar
Arturo Tena committed
99

100 101
#remove scrollkeeper stuff
rm -rf $RPM_BUILD_ROOT/var
Jody Goldberg's avatar
Jody Goldberg committed
102

103 104 105
#remove .la files
rm $RPM_BUILD_ROOT/%{_libdir}/libspreadsheet.la
rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/%{version}/plugins/*/*.la
106

107

108 109
%clean
rm -rf $RPM_BUILD_ROOT
Kjartan Maraas's avatar
Kjartan Maraas committed
110

111

112 113 114 115 116 117
%pre
if [ "$1" -gt 1 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
      %{_sysconfdir}/gconf/schemas/%{name}*.schemas > /dev/null || :
fi
Jody Goldberg's avatar
Jody Goldberg committed
118

119

120 121 122 123 124 125 126 127 128 129 130
%post
/sbin/ldconfig
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
/usr/bin/gconftool-2 --makefile-install-rule \
  %{_sysconfdir}/gconf/schemas/%{name}*.schemas > /dev/null || :
scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

131

132 133 134 135 136 137
%preun
if [ "$1" -eq 0 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
      %{_sysconfdir}/gconf/schemas/%{name}*.schemas > /dev/null || :
fi
Gregory McLean's avatar
Gregory McLean committed
138

139

140 141 142 143 144 145 146
%postun
/sbin/ldconfig
scrollkeeper-update -q || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
147

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc HACKING AUTHORS ChangeLog NEWS BUGS README COPYING
%{_sysconfdir}/gconf/schemas/*.schemas
%{_bindir}/*
%{_libdir}/libspreadsheet-%{version}.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/%{version}
%exclude %{_libdir}/%{name}/%{version}/include
%exclude %{_libdir}/%{name}/%{version}/plugins/perl-*
#%exclude %{_libdir}/%{name}/%{version}/plugins/gdaif
#%exclude %{_libdir}/%{name}/%{version}/plugins/gnome-db
%{_datadir}/pixmaps/%{name}
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{version}
%exclude %{_datadir}/%{name}/%{version}/idl
%{_datadir}/applications/fedora-%{name}.desktop
# The actual omf file is in gnumeric.lang, but find-lang doesn't own the dir!
%dir %{_datadir}/omf/%{name}
%{_mandir}/man1/*

%files devel
%defattr(-,root,root)
%{_datadir}/%{name}/%{version}/idl
%{_libdir}/libspreadsheet.so
%{_libdir}/pkgconfig/libspreadsheet-1.8.pc
%{_includedir}/libspreadsheet-1.8
%{_libdir}/%{name}/%{version}/include

%files plugins-extras
%defattr(-,root,root,-)
%{_libdir}/%{name}/%{version}/plugins/perl-*
#%{_libdir}/%{name}/%{version}/plugins/gdaif
#%{_libdir}/%{name}/%{version}/plugins/gnome-db


%changelog