improvements mainly for rpm plus including make with flexible targets

master
Marc Wäckerlin 9 years ago
parent 7f16b0bcfa
commit e48840a781
  1. 2
      ax_init_standard_project.m4
  2. 28
      bootstrap.sh

@ -131,7 +131,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(DISTRO)
BUILD_NUMBER=${BUILD_NUMBER:-1}
AX_SUBST(BUILD_NUMBER)
BUILD_DATE=$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")
BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
AX_SUBST(BUILD_DATE)
if test -f "${PROJECT_NAME}-logo.png"; then
PROJECT_LOGO="${PROJECT_NAME}-logo.png"

@ -19,13 +19,15 @@ PROJECT_PATH=$(pwd)
DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/}
configure=0
build=0
buildtarget="distcheck"
overwrite=0
rebuild=0
rebuildfiles=()
while test $# -gt 0; do
case "$1" in
(--configure|-c) configure=1;;
(--build|-b) configure=1; build=1;;
(--build|-b) configure=1; build=1;;
(--target|-t) shift; configure=1; build=1; buildtarget="$1";;
(--overwrite|-o) overwrite=1;;
(--rebuild|-r) rebuild=1;;
(--rebuild-file|-f) shift; rebuildfiles+=("$1");;
@ -40,7 +42,8 @@ SYNOPSIS
OPTIONS
--configure, -c call ./configure after initialization
--build, -b build, also call ./configure && make
--build, -b build, also call ./configure && make distcheck
--target, -t <target> same as -b, but specify target instead of distcheck
--overwrite, -o overwrite all basic files (bootstrap.sh, m4-macros)
--rebuild, -r force rebuild of generated files, even if modified
--rebuild-file, -f <file> rebild specific file (can be added multiple times)
@ -691,7 +694,7 @@ EOF
Source: @PACKAGE_NAME@
Priority: extra
Maintainer: @AUTHOR@
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)
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, qttools5-dev-tools | qt4-dev-tools,"; fi)
Package: @PACKAGE_NAME@
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi)
@ -744,11 +747,14 @@ else
echo Applications/...;
fi)
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gnupg, subversion, automake, autoconf$(
if testtag AX_USE_DOXYGEN; then
echo -n ", doxygen, graphviz";
echo -n ", doxygen";
fi)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?fedora} != 20
$(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: graphviz"; fi)
%endif
%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
@ -800,15 +806,21 @@ rm -rf \$RPM_BUILD_ROOT
$(if testtag AX_USE_LIBTOOL; then
echo '/usr/%_lib/@PACKAGE_NAME@.so.*'
else
echo /usr/bin/
echo '/usr/bin/*'
fi)
%doc
$(if testtag AX_USE_LIBTOOL; then
cat <<EOF2
/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
EOF2
else
echo '/usr/share/*'
fi)
$(if testtag AX_USE_LIBTOOL; then
cat <<EOF2
@ -828,7 +840,7 @@ This Package contains all files required for developement.
/usr/%_lib/@PACKAGE_NAME@.a
/usr/%_lib/@PACKAGE_NAME@.la
/usr/%_lib/pkgconfig
/usr/include/
/usr/include/*
%doc
/usr/share/doc/packages/@PACKAGE_NAME@/html
EOF2
@ -881,5 +893,5 @@ fi
#### Run Make If User Requires ####
if test "$build" -eq 1; then
make
make $buildtarget
fi

Loading…
Cancel
Save