changeset 484:35991929975d

fixed instalation of doc files
author nadvornik
date Tue, 22 Apr 2008 09:57:26 +0000
parents c9e3baeda1b1
children 2fef42c958bb
files Makefile.am configure.in doc/Makefile.am geeqie.spec.in
diffstat 4 files changed, 20 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Apr 22 09:40:05 2008 +0000
+++ b/Makefile.am	Tue Apr 22 09:57:26 2008 +0000
@@ -5,7 +5,7 @@
 
 man_MANS = geeqie.1
 
-readmedir = $(datadir)/doc/geeqie-$(VERSION)
+readmedir = @readmedir@
 readme_DATA = README COPYING ChangeLog TODO
 
 desktopdir = $(datadir)/applications
--- a/configure.in	Tue Apr 22 09:40:05 2008 +0000
+++ b/configure.in	Tue Apr 22 09:57:26 2008 +0000
@@ -21,8 +21,16 @@
 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)
--- a/doc/Makefile.am	Tue Apr 22 09:40:05 2008 +0000
+++ b/doc/Makefile.am	Tue Apr 22 09:57:26 2008 +0000
@@ -1,6 +1,6 @@
 ## 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	\
--- a/geeqie.spec.in	Tue Apr 22 09:40:05 2008 +0000
+++ b/geeqie.spec.in	Tue Apr 22 09:57:26 2008 +0000
@@ -3,6 +3,7 @@
 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}
@@ -11,6 +12,7 @@
 %endif
 %else
 BuildRequires:  lcms-devel
+%define docname	%{name}-%{version}
 %endif
 %if 0%{?suse_version} > 1010
 BuildRequires:  libexiv2-devel
@@ -65,25 +67,22 @@
 %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