repair rpm build
This commit is contained in:
		| @@ -1,16 +1,16 @@ | |||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
| # | # | ||||||
| #   Check if a module exists: | #   Check if a module exists: | ||||||
| #     AX_CXX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | #     AX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | ||||||
| # | # | ||||||
| #   Abort if a module does not exist: | #   Abort if a module does not exist: | ||||||
| #     AX_CXX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | #     AX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | ||||||
| # | # | ||||||
| # DESCRIPTIONS | # DESCRIPTIONS | ||||||
| # | # | ||||||
| #    qt_prefix | #    qt_prefix | ||||||
| # | # | ||||||
| #      Each call to AX_CXX_CHECK_QT should have a different prefix | #      Each call to AX_CHECK_QT should have a different prefix | ||||||
| #      value (with a few exceptions discussed later on). This value, | #      value (with a few exceptions discussed later on). This value, | ||||||
| #      usually provided in uppercase, is used as prefix to the | #      usually provided in uppercase, is used as prefix to the | ||||||
| #      variables holding the compiler flags and libraries reported by | #      variables holding the compiler flags and libraries reported by | ||||||
| @@ -42,13 +42,19 @@ AC_DEFUN([AX_CXX_QT_TOOL], [ | |||||||
|     HAVE_$1=1 |     HAVE_$1=1 | ||||||
|     AC_MSG_CHECKING([for $2]) |     AC_MSG_CHECKING([for $2]) | ||||||
|     AC_ARG_VAR([$1], [path to Qt tool $2]) |     AC_ARG_VAR([$1], [path to Qt tool $2]) | ||||||
|     $1=${$1:-$(pkg-config --variable=$2_location Qt5Core)} |     $1=${$1:-$(${PKG_CONFIG} --variable=$2_location Qt5Core)} | ||||||
|     $1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2} |     $1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2-qt5} | ||||||
|     $1=${$1:-$(pkg-config --variable=$2_location QtCore)} |     $1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2} | ||||||
|     $1=${$1:-$(pkg-config --variable=host_bins QtCore)/$2} |     $1=${$1:-$(${PKG_CONFIG} --variable=$2_location QtCore)} | ||||||
|  |     $1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2} | ||||||
|  |     $1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2-qt4} | ||||||
|     if ! which "${$1%% *}" > /dev/null; then |     if ! which "${$1%% *}" > /dev/null; then | ||||||
|       if which "$2" > /dev/null; then |       if which "$2-qt5" > /dev/null; then | ||||||
|  |         $1=$2-qt5 | ||||||
|  |       elif which "$2" > /dev/null; then | ||||||
|         $1=$2 |         $1=$2 | ||||||
|  |       elif which "$2-qt4" > /dev/null; then | ||||||
|  |         $1=$2-qt4 | ||||||
|       else |       else | ||||||
|         HAVE_$1=0 |         HAVE_$1=0 | ||||||
|         $1="" |         $1="" | ||||||
| @@ -100,6 +106,8 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|   PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [ |   PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [ | ||||||
|     HAVE_$1=1 |     HAVE_$1=1 | ||||||
|     AC_DEFINE([HAVE_$1]) |     AC_DEFINE([HAVE_$1]) | ||||||
|  |     QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core) | ||||||
|  |     QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins | ||||||
|     CPPFLAGS+=" ${[$1]5_CFLAGS}" |     CPPFLAGS+=" ${[$1]5_CFLAGS}" | ||||||
|     MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" |     MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" | ||||||
|     CXXFLAGS+=" ${[$1]5_CFLAGS}" |     CXXFLAGS+=" ${[$1]5_CFLAGS}" | ||||||
| @@ -120,6 +128,8 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|     PKG_CHECK_MODULES([$1], [${qt_modules}], [ |     PKG_CHECK_MODULES([$1], [${qt_modules}], [ | ||||||
|       HAVE_$1=1 |       HAVE_$1=1 | ||||||
|       AC_DEFINE([HAVE_$1]) |       AC_DEFINE([HAVE_$1]) | ||||||
|  |       QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore) | ||||||
|  |       QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins | ||||||
|       CPPFLAGS+=" ${$1_CFLAGS}" |       CPPFLAGS+=" ${$1_CFLAGS}" | ||||||
|       MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" |       MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" | ||||||
|       CXXFLAGS+=" ${$1_CFLAGS}" |       CXXFLAGS+=" ${$1_CFLAGS}" | ||||||
| @@ -140,6 +150,8 @@ AC_DEFUN([AX_CHECK_QT], [ | |||||||
|   ]) |   ]) | ||||||
|   AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) |   AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) | ||||||
|   AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag]) |   AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag]) | ||||||
|  |   AC_SUBST(QTDIR) | ||||||
|  |   AC_SUBST(QT_PLUGIN_PATH) | ||||||
|   AC_SUBST(CPPFLAGS) |   AC_SUBST(CPPFLAGS) | ||||||
|   AC_SUBST(MOC_FLAGS) |   AC_SUBST(MOC_FLAGS) | ||||||
|   AC_SUBST(CXXFLAGS) |   AC_SUBST(CXXFLAGS) | ||||||
| @@ -173,13 +185,13 @@ qrc_%.cxx: %.qrc | |||||||
|  |  | ||||||
| # SYNOPSIS | # SYNOPSIS | ||||||
| # | # | ||||||
| #   AX_CXX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | #   AX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) | ||||||
| # | # | ||||||
| # DESCRIPTIONS | # DESCRIPTIONS | ||||||
| # | # | ||||||
| #    qt_prefix | #    qt_prefix | ||||||
| # | # | ||||||
| #      Each call to AX_CXX_CHECK_QT should have a different prefix | #      Each call to AX_CHECK_QT should have a different prefix | ||||||
| #      value (with a few exceptions discussed later on). This value, | #      value (with a few exceptions discussed later on). This value, | ||||||
| #      usually provided in uppercase, is used as prefix to the | #      usually provided in uppercase, is used as prefix to the | ||||||
| #      variables holding the compiler flags and libraries reported by | #      variables holding the compiler flags and libraries reported by | ||||||
|   | |||||||
| @@ -3,45 +3,46 @@ | |||||||
| ##       1         2         3         4         5         6         7         8 | ##       1         2         3         4         5         6         7         8 | ||||||
| ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||||
|  |  | ||||||
|  | # m4_esyscmd_s does not exist on centos 5 and 6 | ||||||
|  | m4_define([mrw_esyscmd_s], [m4_normalize(m4_esyscmd([$1]))]) | ||||||
|  |  | ||||||
| # define least version number from subversion's revision number: | # define least version number from subversion's revision number: | ||||||
| # it is taken modulo 256 due to a bug on Apple's MacOSX | # it is taken modulo 256 due to a bug on Apple's MacOSX | ||||||
| m4_define(x_least, m4_esyscmd_s( | m4_define(x_least, mrw_esyscmd_s([ | ||||||
|   SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" |   SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" | ||||||
|   for path in . .. ../..; do |   for path in . .. ../..; do | ||||||
|     if svn info $path 2>&1 > /dev/null; then |     if svn info $path 2>&1 > /dev/null; then | ||||||
|       SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |       SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') | ||||||
|       (cd $path && svn2cl) |  | ||||||
|       break; |       break; | ||||||
|     fi |     fi | ||||||
|   done |   done | ||||||
|   # Mac does not support LEAST > 255 |   # Mac does not support LEAST > 255 | ||||||
|   echo $ECHO_N $(($SVN_REVISION%256)) |   echo $ECHO_N $(($SVN_REVISION%256)) | ||||||
| )) | ])) | ||||||
| # define version number from subversion's revision number: | # define version number from subversion's revision number: | ||||||
| # it is taken modulo 256 due to a bug on Apple's MacOSX | # it is taken modulo 256 due to a bug on Apple's MacOSX | ||||||
| # add to x_minor if revision number is > 256 | # add to x_minor if revision number is > 256 | ||||||
| m4_define(x_minor_fixed, m4_esyscmd_s( | m4_define(x_minor_fixed, mrw_esyscmd_s([ | ||||||
|   SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" |   SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" | ||||||
|   for path in . .. ../..; do |   for path in . .. ../..; do | ||||||
|     if svn info $path 2>&1 > /dev/null; then |     if svn info $path 2>&1 > /dev/null; then | ||||||
|       SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |       SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') | ||||||
|       (cd $path && svn2cl) |  | ||||||
|       break; |       break; | ||||||
|     fi |     fi | ||||||
|   done |   done | ||||||
|   # Mac does not support LEAST > 255 |   # Mac does not support LEAST > 255 | ||||||
|   echo $ECHO_N $((x_minor+$SVN_REVISION/256)) |   echo $ECHO_N $((x_minor+$SVN_REVISION/256)) | ||||||
| )) | ])) | ||||||
| # setup version number | # setup version number | ||||||
| m4_define(x_version, m4_esyscmd_s( | m4_define(x_version, mrw_esyscmd_s([ | ||||||
|   echo $ECHO_N x_major.x_minor_fixed.x_least |   echo $ECHO_N x_major.x_minor_fixed.x_least | ||||||
| )) | ])) | ||||||
|  |  | ||||||
| ## bugreport mail address is taken from <user@host> in first line of AUTHORS | ## bugreport mail address is taken from <user@host> in first line of AUTHORS | ||||||
| m4_define(x_bugreport, m4_esyscmd_s( | m4_define(x_bugreport, mrw_esyscmd_s([ | ||||||
|   head -1 AUTHORS | \ |   head -1 AUTHORS | \ | ||||||
|     sed -n 's,.*<\([-_.a-z0-9A-Z]*@[-_.a-z0-9A-Z]*\)>.*,\1,gp' |     sed -n 's,.*<\([-_.a-z0-9A-Z]*@[-_.a-z0-9A-Z]*\)>.*,\1,gp' | ||||||
| )) | ])) | ||||||
|  |  | ||||||
| m4_include(ax_check_qt.m4) | m4_include(ax_check_qt.m4) | ||||||
|  |  | ||||||
| @@ -84,7 +85,7 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [ | |||||||
| #     $1 = variable name | #     $1 = variable name | ||||||
| AC_DEFUN([AX_SUBST], [ | AC_DEFUN([AX_SUBST], [ | ||||||
|   AC_SUBST([$1]) |   AC_SUBST([$1]) | ||||||
|   tmp_var=$(echo "${$1}" | awk 1 ORS='\\n') |   tmp_var=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,') | ||||||
|   tmp_var=${tmp_var//\"/\\\"} |   tmp_var=${tmp_var//\"/\\\"} | ||||||
|   tmp_var=${tmp_var//\'/\'\"\'\"\'} |   tmp_var=${tmp_var//\'/\'\"\'\"\'} | ||||||
|   tmp_var=${tmp_var//#/\\#} |   tmp_var=${tmp_var//#/\\#} | ||||||
| @@ -108,7 +109,15 @@ AC_DEFUN([AX_SUBST], [ | |||||||
| # | # | ||||||
| # configures the basic environment | # configures the basic environment | ||||||
| AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ | AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ | ||||||
|   AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_NAME//-/_}'" |   MINGW=no | ||||||
|  |   MAC=no | ||||||
|  |   case $host in | ||||||
|  |     *mingw*) MINGW=yes;; | ||||||
|  |     *darwin* | *rhapsody* | *macosx*) MAC=yes;; | ||||||
|  |   esac | ||||||
|  |   AM_CONDITIONAL(MINGW, test "$MINGW" = "yes") | ||||||
|  |   AM_CONDITIONAL(MAC, test "$MAC" = "yes") | ||||||
|  |   AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'" | ||||||
|   AX_SUBST(NUMBERS) |   AX_SUBST(NUMBERS) | ||||||
|   AX_SUBST(HOME) |   AX_SUBST(HOME) | ||||||
|   README=$(tail -n +3 README) |   README=$(tail -n +3 README) | ||||||
| @@ -134,6 +143,21 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ | |||||||
|      PROJECT_ICON="${PROJECT_NAME}-icon.png" |      PROJECT_ICON="${PROJECT_NAME}-icon.png" | ||||||
|   fi |   fi | ||||||
|   AX_SUBST(PROJECT_ICON) |   AX_SUBST(PROJECT_ICON) | ||||||
|  |  | ||||||
|  |   AC_ARG_ENABLE(pedantic, | ||||||
|  |     [AS_HELP_STRING([--enable-pedantic], | ||||||
|  |                     [enable all warnings and checks, abort on warnings])], | ||||||
|  |     [have_pedantic="$enableval"; test "$enableval" = "yes" &&  \ | ||||||
|  |        AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) | ||||||
|  |   dnl problem in libs: -Wshadow -Wcast-qual | ||||||
|  |   dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) | ||||||
|  |   AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") | ||||||
|  |   if test "$have_pedantic" == "yes"; then | ||||||
|  |     AC_MSG_NOTICE([Pedantic compile mode enabled! | ||||||
|  |      - all warnings for GNU g++ are enabled | ||||||
|  |      - all warnings result in an error | ||||||
|  |      - doxygen warnings are treated as error too]); fi | ||||||
|  |  | ||||||
|   AC_CONFIG_FILES([makefile]) |   AC_CONFIG_FILES([makefile]) | ||||||
|   AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in]) |   AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in]) | ||||||
|   AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in]) |   AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in]) | ||||||
| @@ -141,7 +165,6 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ | |||||||
|   test -f makefile.in && cat >> makefile.in <<EOF |   test -f makefile.in && cat >> makefile.in <<EOF | ||||||
| #### Begin: Appended by $0 | #### Begin: Appended by $0 | ||||||
| EXTRA_DIST = bootstrap.sh | EXTRA_DIST = bootstrap.sh | ||||||
| doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog |  | ||||||
| clean-standard-project-targets: | clean-standard-project-targets: | ||||||
| 	-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION} | 	-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION} | ||||||
| 	-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz | 	-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz | ||||||
| @@ -167,42 +190,29 @@ AC_DEFUN([AX_USE_CXX], [ | |||||||
|   AM_CPPFLAGS+=' -I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}' |   AM_CPPFLAGS+=' -I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}' | ||||||
|   AM_LDFLAGS+=' -L ${top_srcdir}/src -L ${top_builddir}/src' |   AM_LDFLAGS+=' -L ${top_srcdir}/src -L ${top_builddir}/src' | ||||||
|  |  | ||||||
|   # Get rid of that stupid -O2 -g opions! |   # Get rid of those stupid -g -O2 options! | ||||||
|   CXXFLAGS="${CXXFLAGS:-}" |   CXXFLAGS="${CXXFLAGS//-g -O2/}" | ||||||
|  |   CFLAGS="${CFLAGS//-g -O2/}" | ||||||
|  |  | ||||||
| # pass compile flags to make distcheck | # pass compile flags to make distcheck | ||||||
|   AM_DISTCHECK_CONFIGURE_FLAGS="CXXFLAGS='${CXXFLAGS}' CPPFLAGS='${CPPFLAGS}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" |   AM_DISTCHECK_CONFIGURE_FLAGS="CXXFLAGS='${CXXFLAGS}' CPPFLAGS='${CPPFLAGS}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" | ||||||
|   AC_SUBST(AM_DISTCHECK_CONFIGURE_FLAGS) |   AC_SUBST(AM_DISTCHECK_CONFIGURE_FLAGS) | ||||||
|  |  | ||||||
|   AC_ARG_ENABLE(pedantic, |  | ||||||
|     [AS_HELP_STRING([--enable-pedantic], |  | ||||||
|                     [enable all warnings and checks, abort on warnings])], |  | ||||||
|     [have_pedantic="$enableval"; test "$enableval" = "yes" &&  \ |  | ||||||
|        AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) |  | ||||||
|   dnl problem in libs: -Wshadow -Wcast-qual |  | ||||||
|   dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) |  | ||||||
|   AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") |  | ||||||
|   if test "$have_pedantic" == "yes"; then |  | ||||||
|     AC_MSG_NOTICE([Pedantic compile mode enabled! |  | ||||||
|      - all warnings for GNU g++ are enabled |  | ||||||
|      - all warnings result in an error |  | ||||||
|      - doxygen warnings are treated as error too]); fi |  | ||||||
|  |  | ||||||
|   MINGW32=no |  | ||||||
|   MAC=no |  | ||||||
|   case $host_os in |  | ||||||
|     *mingw32*) MINGW32=yes;; |  | ||||||
|     *darwin* | *rhapsody* | *macosx*) MAC=yes;; |  | ||||||
|   esac |  | ||||||
|   AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes") |  | ||||||
|   AM_CONDITIONAL(MAC, test "$MAC" = "yes") |  | ||||||
|    |  | ||||||
|   AC_SUBST(AM_CXXFLAGS) |   AC_SUBST(AM_CXXFLAGS) | ||||||
|   AC_SUBST(AM_CPPFLAGS) |   AC_SUBST(AM_CPPFLAGS) | ||||||
|   AC_SUBST(AM_LDFLAGS) |   AC_SUBST(AM_LDFLAGS) | ||||||
|   AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-cxx-targets], [src/makefile.in]) |   AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-cxx-targets], [src/makefile.in]) | ||||||
|   test -f src/makefile.in && cat >> src/makefile.in <<EOF |   test -f src/makefile.in && cat >> src/makefile.in <<EOF | ||||||
| #### Begin: Appended by $0 | #### Begin: Appended by $0 | ||||||
|  | %.app: % | ||||||
|  | 	-rm -r [\$][@] | ||||||
|  | 	\$(MAKE) DESTDIR=[\$][\$](pwd)/[\$][@]/tmp install | ||||||
|  | 	QTDIR="\${QTDIR}" \ | ||||||
|  | 	QT_PLUGINS="\${QT_PLUGINS}" \ | ||||||
|  | 	QT_PLUGIN_PATH="\${QT_PLUGIN_PATH}" \ | ||||||
|  | 	  \${top_builddir}/mac-create-app-bundle.sh \ | ||||||
|  | 	    [\$][@] [\$][<] [\$][\$](pwd)/[\$][@]/tmp\${prefix} | ||||||
|  |  | ||||||
| maintainer-clean-cxx-targets: | maintainer-clean-cxx-targets: | ||||||
| 	-rm makefile.in | 	-rm makefile.in | ||||||
| #### End: $0 | #### End: $0 | ||||||
| @@ -302,14 +312,16 @@ EOF | |||||||
|  |  | ||||||
| # use this in configure.ac to support RPM packages | # use this in configure.ac to support RPM packages | ||||||
| AC_DEFUN([AX_USE_RPM_PACKAGING], [ | AC_DEFUN([AX_USE_RPM_PACKAGING], [ | ||||||
| #  m4_include(ax_rpm_rules.m4) |  | ||||||
|   AC_CONFIG_FILES([${PACKAGE_NAME}.spec]) |   AC_CONFIG_FILES([${PACKAGE_NAME}.spec]) | ||||||
|   #AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-debian-targets], [makefile.in]) |   #AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-rpm-targets], [makefile.in]) | ||||||
|   AX_ADD_MAKEFILE_TARGET_DEP([.PHONY], [rpm], [makefile.in]) |   AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-rpm-targets], [makefile.in]) | ||||||
|   test -f makefile.in && cat >> makefile.in <<EOF |   test -f makefile.in && cat >> makefile.in <<EOF | ||||||
| #### Begin: Appended by $0 | #### Begin: Appended by $0 | ||||||
|  | EXTRA_DIST += \${PACKAGE_NAME}.spec.in | ||||||
| rpm: dist | rpm: dist | ||||||
| 	rpmbuild -ba --define "_topdir \$(pwd)" --define "_sourcedir \$(pwd)" \${PACKAGE_NAME}.spec | 	rpmbuild -ba --define "_topdir \$\$(pwd)" --define "_sourcedir \$\$(pwd)" \${PACKAGE_NAME}.spec | ||||||
|  | distclean-rpm-targets: | ||||||
|  | 	-rm \${PACKAGE_NAME}.spec | ||||||
| #### End: $0 | #### End: $0 | ||||||
| EOF | EOF | ||||||
| ]) | ]) | ||||||
| @@ -355,7 +367,7 @@ doc: doxyfile | |||||||
| clean-documentation: | clean-documentation: | ||||||
| 	-rm doxygen.errors @PDF_DOC@ | 	-rm doxygen.errors @PDF_DOC@ | ||||||
| distclean-documentation: | distclean-documentation: | ||||||
| 	-rm -r html latex | 	-rm -r html | ||||||
| 	-rm  @PACKAGE_NAME@.doxytag | 	-rm  @PACKAGE_NAME@.doxytag | ||||||
| maintainer-clean-documentation: | maintainer-clean-documentation: | ||||||
| 	-rm makefile.in | 	-rm makefile.in | ||||||
| @@ -365,7 +377,7 @@ install-data-documentation: | |||||||
| 	cp -r html \$(DESTDIR)\${docdir}/ | 	cp -r html \$(DESTDIR)\${docdir}/ | ||||||
| uninstall-documentation: | uninstall-documentation: | ||||||
| 	-chmod -R u+w \$(DESTDIR)\${docdir} | 	-chmod -R u+w \$(DESTDIR)\${docdir} | ||||||
| 	-rm -rf \$(DESTDIR)\${docdir}/* | 	-rm -rf \$(DESTDIR)\${docdir}/html | ||||||
| #### End: $0 | #### End: $0 | ||||||
| EOF | EOF | ||||||
| ]) | ]) | ||||||
| @@ -407,18 +419,22 @@ AC_DEFUN([AX_PKG_REQUIRE], [ | |||||||
|   AC_SUBST(CXXFLAGS) |   AC_SUBST(CXXFLAGS) | ||||||
|   AC_SUBST(PKG_REQUIREMENTS) |   AC_SUBST(PKG_REQUIREMENTS) | ||||||
|   if test -n "$3"; then |   if test -n "$3"; then | ||||||
|     tmp_package=${$1_found} |     if test "${$1_found}" = "no"; then | ||||||
|  |       tmp_package="yes" | ||||||
|  |     else | ||||||
|  |       tmp_package=${$1_found} | ||||||
|  |     fi | ||||||
|     $1_found=no |     $1_found=no | ||||||
|     old_CPPFLAGS=${CPPFLAGS} |     old_CPPFLAGS=${CPPFLAGS} | ||||||
|     CPPFLAGS=" ${$1_CFLAGS} ${CPPFLAGS}" |     CPPFLAGS=" ${$1_CFLAGS} ${CPPFLAGS}" | ||||||
|     AC_CHECK_HEADER([$3], [ |     AC_CHECK_HEADER([$3], [ | ||||||
|       $1_found=yes |       $1_found=${tmp_package} | ||||||
|     ], [ |     ], [ | ||||||
|       for x in ${$1_CFLAGS}; do |       for x in ${$1_CFLAGS}; do | ||||||
|         AC_MSG_NOTICE([search for $3 in ${x[#]-I}]) |         AC_MSG_NOTICE([search for $3 in ${x[#]-I}]) | ||||||
|         for f in $(find ${x[#]-I} -name "$3"); do |         for f in $(find ${x[#]-I} -name "$3"); do | ||||||
|           if test -f "$f"; then |           if test -f "$f"; then | ||||||
|             $1_found=yes |             $1_found=${tmp_package} | ||||||
|             $1_CFLAGS+=" -I${f%/*}" |             $1_CFLAGS+=" -I${f%/*}" | ||||||
|             AC_MSG_NOTICE([added path ${f%/*}]) |             AC_MSG_NOTICE([added path ${f%/*}]) | ||||||
|             break; |             break; | ||||||
| @@ -429,12 +445,12 @@ AC_DEFUN([AX_PKG_REQUIRE], [ | |||||||
|         fi |         fi | ||||||
|       done |       done | ||||||
|       if test "${$1_found}" = "no"; then |       if test "${$1_found}" = "no"; then | ||||||
|         tmp_includedir=$(pkg-config --variable=includedir $tmp_package) |         tmp_includedir=$(${PKG_CONFIG} --variable=includedir $tmp_package) | ||||||
|         for x in ${tmp_includedir}; do |         for x in ${tmp_includedir}; do | ||||||
|           AC_MSG_NOTICE([search for $3 in $x]) |           AC_MSG_NOTICE([search for $3 in $x]) | ||||||
|           for f in $(find ${x} -name "$3"); do |           for f in $(find ${x} -name "$3"); do | ||||||
|             if test -f "$f"; then |             if test -f "$f"; then | ||||||
|               $1_found=yes |               $1_found=${tmp_package} | ||||||
|               $1_CFLAGS+=" -I${f%/*}" |               $1_CFLAGS+=" -I${f%/*}" | ||||||
|               AC_MSG_NOTICE([added path ${f%/*}]) |               AC_MSG_NOTICE([added path ${f%/*}]) | ||||||
|               break; |               break; | ||||||
|   | |||||||
							
								
								
									
										206
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										206
									
								
								bootstrap.sh
									
									
									
									
									
								
							| @@ -100,6 +100,7 @@ GENERATED FILES | |||||||
|     * ax_init_standard_project.m4 - auxiliary macro definition file |     * ax_init_standard_project.m4 - auxiliary macro definition file | ||||||
|     * ax_cxx_compile_stdcxx_11.m4 - auxiliary macro definition file |     * ax_cxx_compile_stdcxx_11.m4 - auxiliary macro definition file | ||||||
|     * ax_check_qt.m4 - auxiliary macro definition file |     * ax_check_qt.m4 - auxiliary macro definition file | ||||||
|  |     * mac-create-app-bundle.sh - script to create apple mac os-x app-bundle | ||||||
|     * AUTHORS - replace your name in AUTHORS before first run |     * AUTHORS - replace your name in AUTHORS before first run | ||||||
|     * configure.ac - global configuration file template |     * configure.ac - global configuration file template | ||||||
|     * makefile.am - global makefile template |     * makefile.am - global makefile template | ||||||
| @@ -121,6 +122,7 @@ GENERATED FILES | |||||||
|     * debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING |     * debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING | ||||||
|     * debian/rules - if you enabled AX_USE_DEBIAN_PACKAGING |     * debian/rules - if you enabled AX_USE_DEBIAN_PACKAGING | ||||||
|     * debian/compat - if you enabled AX_USE_DEBIAN_PACKAGING |     * debian/compat - if you enabled AX_USE_DEBIAN_PACKAGING | ||||||
|  |     * ${DEFAULT_PROJECT_NAME}.spec.in - if you enable AX_USE_RPM_PACKAGING | ||||||
|     * src/${DEFAULT_PROJECT_NAME}.pc.in - if you enabled AX_USE_LIBTOOL |     * src/${DEFAULT_PROJECT_NAME}.pc.in - if you enabled AX_USE_LIBTOOL | ||||||
|  |  | ||||||
| REBUILDING FILES | REBUILDING FILES | ||||||
| @@ -165,6 +167,8 @@ FILE DEPENDENCIES | |||||||
|     * debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL |     * debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL | ||||||
|     * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL |     * debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL | ||||||
|     * debian/${DEFAULT_PROJECT_NAME}-dev.dirs depends on AX_USE_LIBTOOL |     * debian/${DEFAULT_PROJECT_NAME}-dev.dirs depends on AX_USE_LIBTOOL | ||||||
|  |     * ${DEFAULT_PROJECT_NAME}.spec.in dependson AX_USE_RPM_PACKAGING, | ||||||
|  |       AX_USE_LIBTOOL, AX_CXX_CHECK_QT, AX_CXX_QT, AX_USE_CPPUNIT | ||||||
|  |  | ||||||
| FILES | FILES | ||||||
|  |  | ||||||
| @@ -191,7 +195,7 @@ FILES | |||||||
|       * Enable Scripts: AX_USE_SCRIPTS |       * Enable Scripts: AX_USE_SCRIPTS | ||||||
|       * Enable Doxygen documentation generation: AX_USE_DOXYGEN |       * Enable Doxygen documentation generation: AX_USE_DOXYGEN | ||||||
|       * Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING |       * Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING | ||||||
|       * Not yet implemented: AX_USE_RPM_PACKAGING |       * Enable RPM packaging by calling "make rpm": AX_USE_RPM_PACKAGING | ||||||
|       * Enable C++ testing using CppUnit: AX_USE_CPPUNIT |       * Enable C++ testing using CppUnit: AX_USE_CPPUNIT | ||||||
|       * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES |       * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES | ||||||
|       * Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4) |       * Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4) | ||||||
| @@ -297,7 +301,7 @@ to() { | |||||||
|         mode="u=rw,g=rw,o=r" |         mode="u=rw,g=rw,o=r" | ||||||
|         case "$1" in |         case "$1" in | ||||||
|             (--condition) shift # test for a tag, abort if not set |             (--condition) shift # test for a tag, abort if not set | ||||||
|                 if ! testtag "$1" configure.ac; then |                 if ! testtag "$1"; then | ||||||
|                     return |                     return | ||||||
|                 fi;; |                 fi;; | ||||||
|             (--mode) shift # test for a tag, abort if not set |             (--mode) shift # test for a tag, abort if not set | ||||||
| @@ -373,6 +377,7 @@ copy ${MY_NAME} | |||||||
| copy ax_init_standard_project.m4 | copy ax_init_standard_project.m4 | ||||||
| copy ax_cxx_compile_stdcxx_11.m4 | copy ax_cxx_compile_stdcxx_11.m4 | ||||||
| copy ax_check_qt.m4 | copy ax_check_qt.m4 | ||||||
|  | copy mac-create-app-bundle.sh | ||||||
| AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1) | AUTHOR=$(gpg -K  | sed -n 's,uid *,,p' | sort | head -1) | ||||||
| if test -z "${AUTHOR}"; then | if test -z "${AUTHOR}"; then | ||||||
|     AUTHOR="FIRSTNAME LASTNAME (URL) <EMAIL>" |     AUTHOR="FIRSTNAME LASTNAME (URL) <EMAIL>" | ||||||
| @@ -386,7 +391,7 @@ ${HEADER}m4_define(x_package_name, ${DEFAULT_PROJECT_NAME}) # project's name | |||||||
| m4_define(x_major, 0) # project's major version | m4_define(x_major, 0) # project's major version | ||||||
| m4_define(x_minor, 0) # project's minor version | m4_define(x_minor, 0) # project's minor version | ||||||
| m4_include(ax_init_standard_project.m4) | m4_include(ax_init_standard_project.m4) | ||||||
| AC_INIT(x_package_name, x_version, x_package_name) | AC_INIT(x_package_name, x_version, x_bugreport, x_package_name) | ||||||
| AM_INIT_AUTOMAKE([1.9 tar-pax]) | AM_INIT_AUTOMAKE([1.9 tar-pax]) | ||||||
| AX_INIT_STANDARD_PROJECT | AX_INIT_STANDARD_PROJECT | ||||||
|  |  | ||||||
| @@ -409,7 +414,81 @@ AX_INIT_STANDARD_PROJECT | |||||||
| AC_OUTPUT | AC_OUTPUT | ||||||
| EOF | EOF | ||||||
| PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac) | PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac) | ||||||
| echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_CXX src/makefile.am | if ! testtag "AX_CHECK_QT" configure.ac && \ | ||||||
|  |    ! testtag "AX_REQUIRE_QT" configure.ac; then | ||||||
|  |     echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \ | ||||||
|  |         to --condition AX_USE_CXX src/makefile.am | ||||||
|  | else | ||||||
|  |     to --condition AX_USE_CXX src/makefile.am <<EOF | ||||||
|  | ${HEADER}bin_PROGRAMS = ${PACKAGE_NAME} | ||||||
|  |  | ||||||
|  | ## required to enable the translation feature | ||||||
|  | LANGUAGE_FILE_BASE = ${PACKAGE_NAME} | ||||||
|  |  | ||||||
|  | ## list here the Qt plugins your project depends on | ||||||
|  | ## required to build Mac OS-X app-bundle | ||||||
|  | QT_PLUGINS = iconengines imageformats platforms | ||||||
|  |  | ||||||
|  | #### enable if you deliver a KDE/Gnome desktop file | ||||||
|  | #applicationsdir = ${datarootdir}/applications | ||||||
|  | #dist_applications_DATA = ${PACKAGE_NAME}.desktop | ||||||
|  |  | ||||||
|  | #### enable (ev. instead of bin_PROGRAMS) if you build a library | ||||||
|  | #lib_LTLIBRARIES = ${PACKAGE_NAME}.la | ||||||
|  | #${PACKAGE_NAME}_la_SOURCES = libmain.cxx version.cxx | ||||||
|  | ## noop to prevent: | ||||||
|  | ## «src/makefile.am: error: object 'version.\$(OBJEXT)' created both with | ||||||
|  | ## libtool and without» | ||||||
|  | #${PACKAGE_NAME}_la_CXXFLAGS = \$(AM_CXXFLAGS) | ||||||
|  |  | ||||||
|  | ## list headers that are required for build, but that are not installed | ||||||
|  | noinst_HEADERS = version.hxx | ||||||
|  |  | ||||||
|  | ## list all %.hxx files with Q_OBJECT as moc_%.cxx | ||||||
|  | ${PACKAGE_NAME//-/_}_MOCFILES = moc_${PACKAGE_NAME}.cxx | ||||||
|  |  | ||||||
|  | ## list all %.ui files as ui_%.hxx | ||||||
|  | ${PACKAGE_NAME//-/_}_UIFILES = ui_${PACKAGE_NAME}.hxx | ||||||
|  |  | ||||||
|  | ## list all %.qrc resource files as qrc_%.cxx | ||||||
|  | ## note: if there exists a directory %, the file %.qrc is generated from that | ||||||
|  | ${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx qrc_resources.cxx | ||||||
|  |  | ||||||
|  | ## list all final translation files, list all supported languages here | ||||||
|  | ${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm	\\ | ||||||
|  |      \${LANGUAGE_FILE_BASE}_de.qm \\ | ||||||
|  |      \${LANGUAGE_FILE_BASE}_fr.qm \\ | ||||||
|  |      \${LANGUAGE_FILE_BASE}_it.qm | ||||||
|  |  | ||||||
|  | ## list all C++ files that need translation | ||||||
|  | ${PACKAGE_NAME//-/_}_TR_FILES = main.cxx version.cxx | ||||||
|  |  | ||||||
|  | ## automatic assembly, no need to change | ||||||
|  | ${PACKAGE_NAME//-/_}_SOURCES = ${swisssign_pin_entry_TR_FILES} ${BUILT_SOURCES} | ||||||
|  |  | ||||||
|  | ## automatic assembly, no need to change | ||||||
|  | BUILT_SOURCES = \${${PACKAGE_NAME//-/_}_MOCFILES} \ | ||||||
|  |                 \${${PACKAGE_NAME//-/_}_UIFILES} \ | ||||||
|  |                 \${${PACKAGE_NAME//-/_}_TRANSLATIONS} \ | ||||||
|  |                 \${${PACKAGE_NAME//-/_}_RESOURCES} | ||||||
|  |  | ||||||
|  | ## automatic assembly, no need to change | ||||||
|  | EXTRA_DIST_TR = \${${PACKAGE_NAME//-/_}_MOCFILES:moc_%.cxx=%.hxx} \ | ||||||
|  |                 \${${PACKAGE_NAME//-/_}_UIFILES:ui_%.hxx=%.ui} | ||||||
|  |  | ||||||
|  | ## automatic assembly, no need to change | ||||||
|  | ## except: adapt the pre-delivered qt_%.qm list (language files you copy from qt | ||||||
|  | EXTRA_DIST = \${EXTRA_DIST_TR} \ | ||||||
|  |              \${${PACKAGE_NAME//-/_}_RESOURCES:qrc_%.cxx:%.qrc} \ | ||||||
|  |              \${${PACKAGE_NAME//-/_}_TRANSLATIONS:%.qm=%.ts} \ | ||||||
|  |              qt_de.qm qt_fr.qm | ||||||
|  |  | ||||||
|  | ## automatic assembly, no need to change | ||||||
|  | LANGUAGE_FILES = \${EXTRA_DIST_TR} \${${PACKAGE_NAME//-/_}_TR_FILES} | ||||||
|  |  | ||||||
|  | MAINTAINERCLEANFILES = makefile.in | ||||||
|  | EOF | ||||||
|  | fi | ||||||
| to --condition AX_USE_CXX src/version.hxx <<EOF | to --condition AX_USE_CXX src/version.hxx <<EOF | ||||||
| /*! @file | /*! @file | ||||||
|  |  | ||||||
| @@ -552,11 +631,13 @@ if testtag AX_USE_DOXYGEN; then | |||||||
|         if testtag AX_USE_SCRIPTS; then |         if testtag AX_USE_SCRIPTS; then | ||||||
|             doxyadd INPUT "@top_srcdir@/scripts" |             doxyadd INPUT "@top_srcdir@/scripts" | ||||||
|         fi |         fi | ||||||
|  |         if testtag AX_BUILD_HTML; then | ||||||
|  |             doxyadd INPUT "@top_srcdir@/html" | ||||||
|  |         fi | ||||||
|         if testtag AX_USE_CPPUNIT; then |         if testtag AX_USE_CPPUNIT; then | ||||||
|             doxyadd INPUT "@top_srcdir@/test" |             doxyadd INPUT "@top_srcdir@/test" | ||||||
|         fi |         fi | ||||||
|         doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js' |         doxyreplace FILE_PATTERNS '*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt' | ||||||
|         doxyadd FILE_PATTERNS *.wt |  | ||||||
|         doxyreplace RECURSIVE YES |         doxyreplace RECURSIVE YES | ||||||
|         doxyreplace EXCLUDE_PATTERNS "moc_* uic_* qrc_*" |         doxyreplace EXCLUDE_PATTERNS "moc_* uic_* qrc_*" | ||||||
|         if testtag AX_BUILD_EXAMPLES; then |         if testtag AX_BUILD_EXAMPLES; then | ||||||
| @@ -598,7 +679,7 @@ EOF | |||||||
| Source: @PACKAGE_NAME@ | Source: @PACKAGE_NAME@ | ||||||
| Priority: extra | Priority: extra | ||||||
| Maintainer: @AUTHOR@ | Maintainer: @AUTHOR@ | ||||||
| Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi) | Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi) | ||||||
|  |  | ||||||
| Package: @PACKAGE_NAME@ | Package: @PACKAGE_NAME@ | ||||||
| Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi) | Section: $(if testtag AX_USE_LIBTOOL; then echo  "libs"; fi) | ||||||
| @@ -639,6 +720,114 @@ ${HEADER}%: | |||||||
| EOF | EOF | ||||||
|     echo 7 | to debian/compat |     echo 7 | to debian/compat | ||||||
| fi | fi | ||||||
|  | to --condition AX_USE_RPM_PACKAGING ${PACKAGE_NAME}.spec.in <<EOF | ||||||
|  | Summary: @DESCRIPTION@ | ||||||
|  | Name: @PACKAGE_NAME@ | ||||||
|  | Version: @VERSION@ | ||||||
|  | Release: @BUILD_NUMBER@%{?dist} | ||||||
|  | License: LGPL | ||||||
|  | Group: $(if testtag AX_USE_LIBTOOL; then | ||||||
|  |   echo Development/Libraries/C++; | ||||||
|  | else | ||||||
|  |   echo Applications/...; | ||||||
|  | fi) | ||||||
|  | Source0: %{name}-%{version}.tar.gz | ||||||
|  | BuildRequires: gnupg, subversion, automake, autoconf$( | ||||||
|  |     if testtag AX_USE_DOXYGEN; then | ||||||
|  |       echo -n ", doxygen, graphviz"; | ||||||
|  |     fi) | ||||||
|  | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||||||
|  | %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} | ||||||
|  | BuildRequires: pkgconfig, redhat-lsb$( | ||||||
|  |     if testtag AX_USE_CPPUNIT; then | ||||||
|  |       echo -n ", cppunit-devel"; | ||||||
|  |     fi; | ||||||
|  |     if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then | ||||||
|  |       echo -n ", qt5-qtwebkit-devel"; | ||||||
|  |     fi) | ||||||
|  | %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} | ||||||
|  | $(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi) | ||||||
|  | $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi) | ||||||
|  | %else | ||||||
|  | $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt-devel"; fi) | ||||||
|  | %endif | ||||||
|  | %else%if 0%{?suse_version} || 0%{?sles_version} | ||||||
|  | BuildRequires: pkg-config, lsb-release$( | ||||||
|  |     if testtag AX_USE_CPPUNIT; then | ||||||
|  |       echo -n ", libcppunit-devel"; | ||||||
|  |     fi) | ||||||
|  | %if 0%{?suse_version} < 1200 ||  0%{?sles_version} < 1200 | ||||||
|  | $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt4-devel, qt4-x11-tools, libQtWebKit-devel"; fi) | ||||||
|  | %else | ||||||
|  | $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel"; fi) | ||||||
|  | %endif | ||||||
|  | %endif%endif | ||||||
|  |  | ||||||
|  | %description | ||||||
|  | @README@ | ||||||
|  | $(if testtag AX_USE_LIBTOOL; then | ||||||
|  | echo | ||||||
|  | echo This package contains only the shared libraries required at runtime. | ||||||
|  | fi) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | %prep | ||||||
|  | %setup -q | ||||||
|  | ./configure --prefix=/usr \\ | ||||||
|  |             --docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \\ | ||||||
|  |             --libdir=/usr/%_lib | ||||||
|  |  | ||||||
|  | %build | ||||||
|  | make | ||||||
|  |  | ||||||
|  | %install | ||||||
|  | DESTDIR=\$RPM_BUILD_ROOT make install | ||||||
|  |  | ||||||
|  | %clean | ||||||
|  | rm -rf \$RPM_BUILD_ROOT | ||||||
|  |  | ||||||
|  | %files | ||||||
|  | %defattr(-,root,root,-) | ||||||
|  | $(if testtag AX_USE_LIBTOOL; then | ||||||
|  | echo '/usr/%_lib/@PACKAGE_NAME@.so.*' | ||||||
|  | else | ||||||
|  | /usr/bin/ | ||||||
|  | fi) | ||||||
|  | %doc | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/AUTHORS | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/COPYING | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/ChangeLog | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/INSTALL | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/NEWS | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/README | ||||||
|  |  | ||||||
|  | $(if testtag AX_USE_LIBTOOL; then | ||||||
|  | cat <<EOF2 | ||||||
|  | %package devel | ||||||
|  | Summary: @DESCRIPTION@ | ||||||
|  | Group: Development/Libraries/C++ | ||||||
|  | Requires: @PACKAGE_NAME@ = @VERSION@ | ||||||
|  |  | ||||||
|  | %description devel | ||||||
|  | @README@ | ||||||
|  |  | ||||||
|  | This Package contains all files required for developement. | ||||||
|  |  | ||||||
|  | %files devel | ||||||
|  | %defattr(-,root,root,-) | ||||||
|  | /usr/%_lib/@PACKAGE_NAME@.so | ||||||
|  | /usr/%_lib/@PACKAGE_NAME@.a | ||||||
|  | /usr/%_lib/@PACKAGE_NAME@.la | ||||||
|  | /usr/%_lib/pkgconfig | ||||||
|  | /usr/include/ | ||||||
|  | %doc | ||||||
|  | /usr/share/doc/packages/@PACKAGE_NAME@/html | ||||||
|  | EOF2 | ||||||
|  | fi) | ||||||
|  |  | ||||||
|  | %changelog | ||||||
|  |  | ||||||
|  | EOF | ||||||
| SUBDIRS="" | SUBDIRS="" | ||||||
| for d in src test scripts doc examples html; do | for d in src test scripts doc examples html; do | ||||||
|     test -d $d && SUBDIRS="${SUBDIRS} $d" |     test -d $d && SUBDIRS="${SUBDIRS} $d" | ||||||
| @@ -646,6 +835,8 @@ done | |||||||
| to makefile.am<<EOF | to makefile.am<<EOF | ||||||
| ${HEADER}SUBDIRS =${SUBDIRS} | ${HEADER}SUBDIRS =${SUBDIRS} | ||||||
|  |  | ||||||
|  | doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog | ||||||
|  |  | ||||||
| MAINTAINERCLEANFILES = makefile.in | MAINTAINERCLEANFILES = makefile.in | ||||||
| EOF | EOF | ||||||
| to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF | to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF | ||||||
| @@ -668,6 +859,7 @@ if test -f makefile; then | |||||||
| fi | fi | ||||||
|  |  | ||||||
| #### Bootstrap Before Configure #### | #### Bootstrap Before Configure #### | ||||||
|  | run --no-check svn2cl | ||||||
| run aclocal | run aclocal | ||||||
| run libtoolize --force | run libtoolize --force | ||||||
| run automake -a | run automake -a | ||||||
|   | |||||||
| @@ -1,25 +1,35 @@ | |||||||
| Summary: XML C++ Library | Summary: @DESCRIPTION@ | ||||||
| Name: @PACKAGE_NAME@ | Name: @PACKAGE_NAME@ | ||||||
| Version: @PACKAGE_VERSION@ | Version: @VERSION@ | ||||||
| Release: 1 | Release: @BUILD_NUMBER@%{?dist} | ||||||
| License: LGPL | License: LGPL | ||||||
| Group: Development/Libraries/C++ | Group: Development/Libraries/C++ | ||||||
| URL: https://dev.marc.waeckerlin.org/projects/@PACKAGE_NAME@ |  | ||||||
| Source0: %{name}-%{version}.tar.gz | Source0: %{name}-%{version}.tar.gz | ||||||
| BuildRequires: subversion gcc-c++ doxygen graphviz texlive automake autoconf libtool make | BuildRequires: gnupg, subversion, automake, autoconf, doxygen, graphviz | ||||||
| BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||||||
| %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} | %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} | ||||||
| BuildRequires: cppunit-devel | BuildRequires: pkgconfig, redhat-lsb, cppunit-devel | ||||||
| %else%if 0%{?suse_version} || 0%{?sles_version} | %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} | ||||||
| BuildRequires: libcppunit-devel | BuildRequires: mscgen | ||||||
| %endif%endif |  | ||||||
|  |  | ||||||
|  | %else | ||||||
|  |  | ||||||
|  | %endif | ||||||
|  | %else%if 0%{?suse_version} || 0%{?sles_version} | ||||||
|  | BuildRequires: pkg-config, lsb-release, libcppunit-devel | ||||||
|  | %if 0%{?suse_version} < 1200 ||  0%{?sles_version} < 1200 | ||||||
|  |  | ||||||
|  | %else | ||||||
|  |  | ||||||
|  | %endif | ||||||
|  | %endif%endif | ||||||
|  |  | ||||||
| %description | %description | ||||||
| @README@ | @README@ | ||||||
|  |  | ||||||
| This package contains only the shared libraries required at runtime. | This package contains only the shared libraries required at runtime. | ||||||
|  |  | ||||||
|  |  | ||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| ./configure --prefix=/usr \ | ./configure --prefix=/usr \ | ||||||
| @@ -47,10 +57,9 @@ rm -rf $RPM_BUILD_ROOT | |||||||
| /usr/share/doc/packages/@PACKAGE_NAME@/README | /usr/share/doc/packages/@PACKAGE_NAME@/README | ||||||
|  |  | ||||||
| %package devel | %package devel | ||||||
| Summary: XML C++ Library (development files) | Summary: @DESCRIPTION@ | ||||||
| Group: Development/Libraries/C++ | Group: Development/Libraries/C++ | ||||||
| Requires: @PACKAGE_NAME@ = @PACKAGE_VERSION@ | Requires: @PACKAGE_NAME@ = @VERSION@ | ||||||
|  |  | ||||||
|  |  | ||||||
| %description devel | %description devel | ||||||
| @README@ | @README@ | ||||||
| @@ -61,14 +70,11 @@ This Package contains all files required for developement. | |||||||
| %defattr(-,root,root,-) | %defattr(-,root,root,-) | ||||||
| /usr/%_lib/@PACKAGE_NAME@.so | /usr/%_lib/@PACKAGE_NAME@.so | ||||||
| /usr/%_lib/@PACKAGE_NAME@.a | /usr/%_lib/@PACKAGE_NAME@.a | ||||||
| /usr/%_lib/pkgconfig |  | ||||||
| /usr/%_lib/@PACKAGE_NAME@.la | /usr/%_lib/@PACKAGE_NAME@.la | ||||||
|  | /usr/%_lib/pkgconfig | ||||||
| /usr/include/ | /usr/include/ | ||||||
| /usr/share/pkgconfig |  | ||||||
| %doc | %doc | ||||||
| /usr/share/doc/packages/@PACKAGE_NAME@/html | /usr/share/doc/packages/@PACKAGE_NAME@/html | ||||||
| /usr/share/doc/packages/@PACKAGE_NAME@/@PACKAGE_NAME@.spec |  | ||||||
|  |  | ||||||
| %changelog | %changelog | ||||||
| * Wed Apr 21 2010 Marc Wäckerlin <marc@dev0002.int.swisssign.net> - cxx-1 |  | ||||||
| - Initial build. |  | ||||||
|   | |||||||
							
								
								
									
										103
									
								
								mac-create-app-bundle.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										103
									
								
								mac-create-app-bundle.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,103 @@ | |||||||
|  | #!/bin/bash -ex | ||||||
|  |  | ||||||
|  | ## @id $Id$ | ||||||
|  | ## | ||||||
|  | ## Create Mac OS-X App Bundle from built file | ||||||
|  | ## | ||||||
|  | ## Parameters: | ||||||
|  | ##  $1: name of the app-target | ||||||
|  | ##  $2: name of the project | ||||||
|  | ##  $3: installation source | ||||||
|  | ## | ||||||
|  | ##       1         2         3         4         5         6         7         8 | ||||||
|  | ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||||
|  |  | ||||||
|  | if test "$(uname -s)" != "Darwin"; then | ||||||
|  |     echo "**** ERROR: run on Mac OS-X: $0" | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | test -n "$1" | ||||||
|  | test -n "$2" | ||||||
|  | test -d "$3" | ||||||
|  | target="$(pwd)/${1}/Contents/MacOS" | ||||||
|  |  | ||||||
|  | # Step 1: create and fill app directory structure | ||||||
|  | mkdir -p ${1}/Contents/{Resources,MacOS} | ||||||
|  | ! test -d ${3}/bin || \ | ||||||
|  |      find ${3}/bin -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \; | ||||||
|  | executablefile=$(ls -1 ${1}/Contents/MacOS/ | head -1) | ||||||
|  | ! test -d ${3}/lib || \ | ||||||
|  |     find ${3}/lib -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \; | ||||||
|  | ! test -d ${3}/share/${2} || \ | ||||||
|  |     find ${3}/share/${2} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; | ||||||
|  | ! test -d ${3}/share/${2} || rmdir ${3}/share/${2} | ||||||
|  | ! test -d ${3}/share || \ | ||||||
|  |     find ${3}/share -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; | ||||||
|  | ! test -d ${3}/bin || rmdir ${3}/bin | ||||||
|  | ! test -d ${3}/lib || rmdir ${3}/lib | ||||||
|  | ! test -d ${3}/share || rmdir ${3}/share | ||||||
|  | ! test -d ${3} || \ | ||||||
|  |     find ${3} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \; | ||||||
|  | ! test -d ${3} || rmdir ${3} | ||||||
|  | ! test -d ${1}/tmp || rm -r ${1}/tmp | ||||||
|  |  | ||||||
|  | # Step 2: copy qt plugins, if necessary | ||||||
|  | for f in ${QT_PLUGINS}; do | ||||||
|  |     test -d ${target}/${f} \ | ||||||
|  |         || cp -r ${QT_PLUGIN_PATH}/${f} ${target}/${f} \ | ||||||
|  |         || exit 1 | ||||||
|  | done | ||||||
|  |  | ||||||
|  | # Step 3: resolve all library dependencies | ||||||
|  | found=1 | ||||||
|  | oldpath="$(pwd)" | ||||||
|  | while [ $found -ne 0 ]; do | ||||||
|  |     found=0 | ||||||
|  |     cd "${target}" | ||||||
|  |     for file in $(find . -type f); do | ||||||
|  |         for lib in $(otool -L ${file} | tail -n +2 \ | ||||||
|  |             | egrep '/opt/local/|'"${HOME}" \ | ||||||
|  |             | grep -v $file | awk '{print $1}'); do | ||||||
|  |             found=1 | ||||||
|  |             test -f ${lib##*/} \ | ||||||
|  |                 || ( \ | ||||||
|  |                 cp ${lib} . \ | ||||||
|  |                 && chmod u+w ${lib##*/} \ | ||||||
|  |                 ) \ | ||||||
|  |                 || exit 1 | ||||||
|  |             install_name_tool -change ${lib} \ | ||||||
|  |                 @executable_path/${lib##*/} ${file} \ | ||||||
|  |                 || exit 1 | ||||||
|  |         done | ||||||
|  |     done | ||||||
|  | done | ||||||
|  | cd ${oldpath} | ||||||
|  |  | ||||||
|  | # Step 4: if necessary, install qt_menu.nib | ||||||
|  | if test -n "${QTDIR}"; then | ||||||
|  |     MENU_NIB=$(find ${QTDIR} -name .svn -prune -o -name qt_menu.nib -print \ | ||||||
|  |                | head -1) | ||||||
|  |     if test -e "${MENU_NIB}"; then | ||||||
|  |         rsync -r "${MENU_NIB}" ${1}/Contents/Resources/ | ||||||
|  |         test -d ${1}/Contents/Resources/qt_menu.nib | ||||||
|  |     fi | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | # Step 5: copy or create info.plist | ||||||
|  | infoplist=$(find ${1}/Contents/Resources -name Info.plist) | ||||||
|  | if test -f "${infoplist}"; then | ||||||
|  |     mv "${infoplist}" ${1}/Contents/Info.plist | ||||||
|  | else | ||||||
|  |     cat > ${1}/Contents/Info.plist <<EOF | ||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||||
|  | <plist version="1.0"> | ||||||
|  |   <dict> | ||||||
|  |     <key>CFBundleIdentifier</key> | ||||||
|  |     <string>${2}</string> | ||||||
|  |     <key>CFBundleExecutable</key> | ||||||
|  |     <string>${executablefile##/}</string> | ||||||
|  |   </dict> | ||||||
|  | </plist> | ||||||
|  | EOF | ||||||
|  | fi | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| ## @id $Id$ | ## @id $Id$ | ||||||
| # | # | ||||||
| # This file has been added by bootstrap.sh on Mon, 13 July 2015 12:42:59 +0200 | # This file has been added by bootstrap.sh on Fri, 31 July 2015 08:57:51 +0200 | ||||||
| # Feel free to change it or even remove and rebuild it, up to your needs | # Feel free to change it or even remove and rebuild it, up to your needs | ||||||
| # | # | ||||||
| ##       1         2         3         4         5         6         7         8 | ##       1         2         3         4         5         6         7         8 | ||||||
| @@ -8,4 +8,6 @@ | |||||||
|  |  | ||||||
| SUBDIRS = src test doc examples | SUBDIRS = src test doc examples | ||||||
|  |  | ||||||
|  | doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog | ||||||
|  |  | ||||||
| MAINTAINERCLEANFILES = makefile.in | MAINTAINERCLEANFILES = makefile.in | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user