man_MANS = geeqie.1
-readmedir = $(datadir)/doc/geeqie-$(VERSION)
+readmedir = @readmedir@
readme_DATA = README COPYING ChangeLog TODO
desktopdir = $(datadir)/applications
AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.))
AC_PATH_PROGS(GDK_PIXBUF_CSOURCE, "gdk-pixbuf-csource")
-AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$prefix/share/doc/geeqie-$VERSION", [Location of documentation files])
-AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$prefix/share/doc/geeqie-$VERSION/html", [Location of html documentation])
+AC_ARG_WITH(readmedir, [ --with-readmedir=DIR install path for readme files],
+ readmedir=$withval, readmedir="$prefix/share/doc/geeqie-$VERSION")
+AC_ARG_WITH(htmldir, [ --with-htmldir=DIR install path for html files],
+ htmldir=$withval, htmldir="$readmedir/html")
+
+AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$readmedir", [Location of documentation files])
+AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$htmldir", [Location of html documentation])
+
+AC_SUBST(readmedir)
+AC_SUBST(htmldir)
dnl checks for functions
AC_CHECK_FUNCS(strverscmp access fsync fflush)
## Process this file with automake to produce Makefile.in.
-helpdir = $(datadir)/doc/geeqie-$(VERSION)/html
+helpdir = @htmldir@
help_DATA = \
gnu_fdl.txt \
gqview_faq.html \
BuildRequires: gtk2-devel gcc-c++
%if 0%{?suse_version}
BuildRequires: liblcms-devel
+%define docname %{name}
%if %suse_version < 1030
%define _prefix /opt/gnome
%define _sysconfdir /etc%{prefix}
%endif
%else
BuildRequires: lcms-devel
+%define docname %{name}-%{version}
%endif
%if 0%{?suse_version} > 1010
BuildRequires: libexiv2-devel
%setup -q
%build
-%configure
+%configure --with-readmedir="%{_docdir}/%{docname}"
-%__make %{?jobs:-j%{jobs}} \
- helpdir="%{_docdir}/%{name}/html" \
- readmedir="%{_docdir}/%{name}"
+
+%__make %{?jobs:-j%{jobs}}
%install
-make install DESTDIR=%{buildroot} \
- helpdir="%{_docdir}/%{name}/html" \
- readmedir="%{_docdir}/%{name}"
+make install DESTDIR=%{buildroot}
-%__install AUTHORS COPYING ChangeLog NEWS README "%{buildroot}/%{_docdir}/%{name}/"
+%__install AUTHORS COPYING ChangeLog NEWS README "%{buildroot}/%{_docdir}/%{docname}/"
%clean
%__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
-%doc %{_docdir}/%{name}
+%doc %{_docdir}/%{docname}
%{_bindir}/geeqie
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{_datadir}/applications/geeqie.desktop