From efe3cc5cfc6e34bf024e0d17dae6467b8282ffcb Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Thu, 29 Nov 2001 01:39:49 +0000 Subject: [PATCH] 2001-11-29 Hans Ulrich Niedermann * Makefile.am: enable RPM and CVS rules only when useful * configure.in: init RPM packaging * libgphoto2_port/m4/packaging.m4: added packaging macro git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3274 67ed7778-7388-44ab-90cf-0a291f65f57c --- ChangeLog | 5 +++++ Makefile.am | 7 +++++++ configure.in | 7 ++++++- libgphoto2_port/ChangeLog | 4 ++++ libgphoto2_port/m4/packaging.m4 | 16 ++++++++++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 libgphoto2_port/m4/packaging.m4 diff --git a/ChangeLog b/ChangeLog index 1d143214a..4ae27be0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-29 Hans Ulrich Niedermann + * Makefile.am: enable RPM and CVS rules only when useful + * configure.in: init RPM packaging + * libgphoto2_port/m4/packaging.m4: added packaging macro + 2001-11-27 Lutz Müller * libgphoto2/gphoto2-camera.c: Update documentation. diff --git a/Makefile.am b/Makefile.am index f10b89517..b6ce5cb0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,15 +50,22 @@ dist-bzip2: -chmod -R a+r $(distdir) -$(TAR) chojf $(distdir).tar.bz2 $(distdir) +if ENABLE_RPM + # create RPM packages .PHONY: rpm rpm: Makefile $(MAKE) dist $(MAKE) -C packaging/rpm rpm +endif + +if MAINTAINER_MODE + # add CVS tags - used only by the project maintainer to tag the files of a # released version .PHONY: cvs-tags cvs-tags: Makefile @echo cvs tag "@PACKAGE@-$$(echo '@VERSION@' | sed 's/\./_/g')" +endif diff --git a/configure.in b/configure.in index 939eae8a2..b2a9db79e 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ AM_GNU_GETTEXT AC_CHECK_FUNC(gettext, gettext_without_libintl=true) # same trick as with libdl: # if gettext() doesn't require linking against libintl, -# we don't have to check for dlopen in libintl. Otherwise +# we don't have to check for gettext in libintl. Otherwise # we may even require libintl. dnl AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"]) if test "$gettext_without_libintl" != "true"; then @@ -158,6 +158,11 @@ dnl build docs? dnl ******** GP_BUILD_DOCS()dnl +dnl ************************************************************ +dnl initialize packaging RPMs +dnl ************************************************************ +PKG_CHECK_RPM()dnl + dnl ************************* dnl Configure libgphoto2-port dnl ************************* diff --git a/libgphoto2_port/ChangeLog b/libgphoto2_port/ChangeLog index 663a8e030..eeb3daa29 100644 --- a/libgphoto2_port/ChangeLog +++ b/libgphoto2_port/ChangeLog @@ -1,3 +1,7 @@ +2001-11-29 Hans Ulrich Niedermann + + * libgphoto2_port/m4/packaging.m4: added packaging macro + 2001-11-27 Hans Ulrich Niedermann * po/libgphoto2_port.pot: I'm sick of all the diffs diff --git a/libgphoto2_port/m4/packaging.m4 b/libgphoto2_port/m4/packaging.m4 new file mode 100644 index 000000000..ae2700176 --- /dev/null +++ b/libgphoto2_port/m4/packaging.m4 @@ -0,0 +1,16 @@ +AC_DEFUN(PKG_CHECK_RPM, +[ +AC_ARG_WITH(rpmbuild, [ --with-rpmbuild=PATH program to use for building RPMs]) + +AC_MSG_CHECKING([rpmbuild]) +if test -x "${with_doc_dir}" +then + RPMBUILD="${with_doc_dir}" + AC_MSG_RESULT([${RPMBUILD} (from parameter)]) + AC_SUBST(RPMBUILD) +else + AC_CHECK_PROGS(RPMBUILD, [rpmbuild rpm], /bin/false) + AC_MSG_RESULT([${RPMBUILD} (autodetect)]) +fi +AM_CONDITIONAL(ENABLE_RPM, test "$RPMBUILD" != "/bin/false") +])