Fixes #13 by introducing vibration where available

php
Marc Wäckerlin 9 years ago
parent fcd44e79d5
commit 32acb4e442
  1. 4
      ChangeLog
  2. 30
      ax_check_qt.m4
  3. 78
      ax_init_standard_project.m4
  4. 195
      bootstrap.sh
  5. 2
      configure.ac
  6. 2
      html/index.html.in
  7. 17
      html/safechat.js
  8. 22
      mac-create-app-bundle.sh

@ -1,3 +1,7 @@
2015-07-16 10:54 marc
* ChangeLog, doc/doxyfile.in: try without searchbox
2015-07-15 21:33 marc
* ChangeLog, html/checknewuser.php, html/documentation.dox,

@ -1,16 +1,16 @@
# SYNOPSIS
#
# 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:
# AX_CXX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
# AX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
#
# DESCRIPTIONS
#
# 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,
# usually provided in uppercase, is used as prefix to the
# variables holding the compiler flags and libraries reported by
@ -42,13 +42,19 @@ AC_DEFUN([AX_CXX_QT_TOOL], [
HAVE_$1=1
AC_MSG_CHECKING([for $2])
AC_ARG_VAR([$1], [path to Qt tool $2])
$1=${$1:-$(pkg-config --variable=$2_location Qt5Core)}
$1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2}
$1=${$1:-$(pkg-config --variable=$2_location QtCore)}
$1=${$1:-$(pkg-config --variable=host_bins QtCore)/$2}
$1=${$1:-$(${PKG_CONFIG} --variable=$2_location Qt5Core)}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2-qt5}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$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 "$2" > /dev/null; then
if which "$2-qt5" > /dev/null; then
$1=$2-qt5
elif which "$2" > /dev/null; then
$1=$2
elif which "$2-qt4" > /dev/null; then
$1=$2-qt4
else
HAVE_$1=0
$1=""
@ -100,7 +106,7 @@ AC_DEFUN([AX_CHECK_QT], [
PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [
HAVE_$1=1
AC_DEFINE([HAVE_$1])
QTDIR=$(pkg-config --variable=prefix Qt5Core)
QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
CPPFLAGS+=" ${[$1]5_CFLAGS}"
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
@ -122,7 +128,7 @@ AC_DEFUN([AX_CHECK_QT], [
PKG_CHECK_MODULES([$1], [${qt_modules}], [
HAVE_$1=1
AC_DEFINE([HAVE_$1])
QTDIR=$(pkg-config --variable=prefix QtCore)
QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
CPPFLAGS+=" ${$1_CFLAGS}"
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
@ -179,13 +185,13 @@ qrc_%.cxx: %.qrc
# 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
#
# 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,
# usually provided in uppercase, is used as prefix to the
# variables holding the compiler flags and libraries reported by

@ -3,45 +3,44 @@
## 1 2 3 4 5 6 7 8
## 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:
# 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"
for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
(cd $path && svn2cl)
break;
fi
done
# Mac does not support LEAST > 255
echo $ECHO_N $(($SVN_REVISION%256))
))
]))
# define version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX
# add to x_minor if revision number is > 256
m4_define(x_minor_fixed, m4_esyscmd_s(
m4_define(x_minor_diff, mrw_esyscmd_s([
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
(cd $path && svn2cl)
break;
fi
fi;
done
# Mac does not support LEAST > 255
echo $ECHO_N $((x_minor+$SVN_REVISION/256))
))
echo $ECHO_N $(($SVN_REVISION/256))
]))
# setup version number
m4_define(x_version, m4_esyscmd_s(
echo $ECHO_N x_major.x_minor_fixed.x_least
))
m4_define(x_version, [x_major.m4_eval(x_minor+x_minor_diff).x_least])
## 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 | \
sed -n 's,.*<\([-_.a-z0-9A-Z]*@[-_.a-z0-9A-Z]*\)>.*,\1,gp'
))
]))
m4_include(ax_check_qt.m4)
@ -84,7 +83,7 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [
# $1 = variable name
AC_DEFUN([AX_SUBST], [
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//#/\\#}
@ -108,7 +107,15 @@ AC_DEFUN([AX_SUBST], [
#
# configures the basic environment
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(HOME)
README=$(tail -n +3 README)
@ -156,7 +163,6 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
test -f makefile.in && cat >> makefile.in <<EOF
#### Begin: Appended by $0
EXTRA_DIST = bootstrap.sh
doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
clean-standard-project-targets:
-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION}
-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz
@ -182,22 +188,14 @@ AC_DEFUN([AX_USE_CXX], [
AM_CPPFLAGS+=' -I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}'
AM_LDFLAGS+=' -L ${top_srcdir}/src -L ${top_builddir}/src'
# Get rid of that stupid -O2 -g opions!
CXXFLAGS="${CXXFLAGS:-}"
# Get rid of those stupid -g -O2 options!
CXXFLAGS="${CXXFLAGS//-g -O2/}"
CFLAGS="${CFLAGS//-g -O2/}"
# pass compile flags to make distcheck
AM_DISTCHECK_CONFIGURE_FLAGS="CXXFLAGS='${CXXFLAGS}' CPPFLAGS='${CPPFLAGS}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
AC_SUBST(AM_DISTCHECK_CONFIGURE_FLAGS)
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_CPPFLAGS)
AC_SUBST(AM_LDFLAGS)
@ -264,9 +262,9 @@ EOF
# use this in configure.ac to support C++ libraries
AC_DEFUN([AX_USE_LIBTOOL], [
# libtool versioning
LIB_MAJOR=m4_eval(x_major+x_minor_fixed)
LIB_MAJOR=m4_eval(x_major+x_minor+x_minor_diff)
LIB_MINOR=x_least
LIB_LEAST=x_minor_fixed
LIB_LEAST=m4_eval(x_minor+x_minor_diff)
LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}"
AM_LDFLAGS="-version-info ${LIB_VERSION}"
AC_SUBST(AM_LDFLAGS)
@ -312,14 +310,16 @@ EOF
# use this in configure.ac to support RPM packages
AC_DEFUN([AX_USE_RPM_PACKAGING], [
# m4_include(ax_rpm_rules.m4)
AC_CONFIG_FILES([${PACKAGE_NAME}.spec])
#AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-debian-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([.PHONY], [rpm], [makefile.in])
#AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-rpm-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-rpm-targets], [makefile.in])
test -f makefile.in && cat >> makefile.in <<EOF
#### Begin: Appended by $0
EXTRA_DIST += \${PACKAGE_NAME}.spec.in
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
EOF
])
@ -365,7 +365,7 @@ doc: doxyfile
clean-documentation:
-rm doxygen.errors @PDF_DOC@
distclean-documentation:
-rm -r html latex
-rm -r html
-rm @PACKAGE_NAME@.doxytag
maintainer-clean-documentation:
-rm makefile.in
@ -375,7 +375,7 @@ install-data-documentation:
cp -r html \$(DESTDIR)\${docdir}/
uninstall-documentation:
-chmod -R u+w \$(DESTDIR)\${docdir}
-rm -rf \$(DESTDIR)\${docdir}/*
-rm -rf \$(DESTDIR)\${docdir}/html
#### End: $0
EOF
])
@ -416,8 +416,12 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(PKG_REQUIREMENTS)
if test -n "$3" -a "${$1_found}" != "no"; then
if test -n "$3"; then
if test "${$1_found}" = "no"; then
tmp_package="yes"
else
tmp_package=${$1_found}
fi
$1_found=no
old_CPPFLAGS=${CPPFLAGS}
CPPFLAGS=" ${$1_CFLAGS} ${CPPFLAGS}"
@ -439,7 +443,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
fi
done
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
AC_MSG_NOTICE([search for $3 in $x])
for f in $(find ${x} -name "$3"); do

@ -122,6 +122,7 @@ GENERATED FILES
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs - 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
* ${DEFAULT_PROJECT_NAME}.spec.in - if you enable AX_USE_RPM_PACKAGING
* src/${DEFAULT_PROJECT_NAME}.pc.in - if you enabled AX_USE_LIBTOOL
REBUILDING FILES
@ -166,6 +167,8 @@ FILE DEPENDENCIES
* 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.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
@ -192,7 +195,7 @@ FILES
* Enable Scripts: AX_USE_SCRIPTS
* Enable Doxygen documentation generation: AX_USE_DOXYGEN
* 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++ 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)
@ -298,7 +301,7 @@ to() {
mode="u=rw,g=rw,o=r"
case "$1" in
(--condition) shift # test for a tag, abort if not set
if ! testtag "$1" configure.ac; then
if ! testtag "$1"; then
return
fi;;
(--mode) shift # test for a tag, abort if not set
@ -388,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_minor, 0) # project's minor version
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])
AX_INIT_STANDARD_PROJECT
@ -411,7 +414,81 @@ AX_INIT_STANDARD_PROJECT
AC_OUTPUT
EOF
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
/*! @file
@ -602,7 +679,7 @@ EOF
Source: @PACKAGE_NAME@
Priority: extra
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@
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi)
@ -643,6 +720,111 @@ ${HEADER}%:
EOF
echo 7 | to debian/compat
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 ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
$(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=""
for d in src test scripts doc examples html; do
test -d $d && SUBDIRS="${SUBDIRS} $d"
@ -650,6 +832,8 @@ done
to makefile.am<<EOF
${HEADER}SUBDIRS =${SUBDIRS}
doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
MAINTAINERCLEANFILES = makefile.in
EOF
to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF
@ -672,6 +856,7 @@ if test -f makefile; then
fi
#### Bootstrap Before Configure ####
run --no-check svn2cl
run aclocal
run libtoolize --force
run automake -a

@ -29,5 +29,7 @@ AX_BUILD_HTML
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
#AX_QT_NO_KEYWORDS
AC_CONFIG_FILES([html/index.html])
# create output
AC_OUTPUT

@ -15,7 +15,7 @@
<body>
<div id="header">
<h1>Safe Chat</h1>
<h1>Safe Chat @PACKAGE_VERSION@</h1>
</div>
<div id="main">

@ -119,6 +119,19 @@ function status(text, msg) {
});
}
/// Alert user
/** Alert user, e.g. that a new message has arrived.
@param */
function alert() {
navigator.vibrate =
navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;
if (navigator.vibrate) {
// vibration API supported
navigator.vibrate(1000);
}
(new Audio("A-Tone-His_Self-1266414414.mp3")).play();
}
/// Check if user name is available
/** Calls checknewuser.php on server and displays an error, if the
user name is already in use. This function is used when creating a
@ -372,9 +385,7 @@ function get() {
// calculate and show emoticons
$('#id'+e.id).emoticonize();
// beep for the first new message
if (!beeped)
(new Audio("A-Tone-His_Self-1266414414.mp3"))
.play();
if (!beeped) alert()
beeped = true;
success();
})

@ -25,6 +25,7 @@ target="$(pwd)/${1}/Contents/MacOS"
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} || \
@ -49,6 +50,7 @@ done
# Step 3: resolve all library dependencies
found=1
oldpath="$(pwd)"
while [ $found -ne 0 ]; do
found=0
cd "${target}"
@ -69,6 +71,7 @@ while [ $found -ne 0 ]; do
done
done
done
cd ${oldpath}
# Step 4: if necessary, install qt_menu.nib
if test -n "${QTDIR}"; then
@ -79,3 +82,22 @@ if test -n "${QTDIR}"; then
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
Loading…
Cancel
Save