Skip to content

Commit

Permalink
tweak autotools scripts for openSUSE
Browse files Browse the repository at this point in the history
Related to #181

Signed-off-by: Jakub Filak <jfilak@redhat.com>
  • Loading branch information
Jakub Filak committed Sep 20, 2013
1 parent d326f8c commit 2d9209b
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 27 deletions.
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EOH

build_depslist()
{
DEPS_LIST=`grep "^\(Build\)\?Requires:" *.spec.in | grep -v "%{name}" | tr -s " " | tr "," "\n" | cut -f2 -d " " | grep -v "^abrt" | sort -u | while read br; do if [ "%" = ${br:0:1} ]; then grep "^%define ${br:2:-1}" *.spec.in | cut -f3 -d" "; else echo $br ;fi ; done | tr "\n" " "`
DEPS_LIST=`grep "^\(Build\)\?Requires:" *.spec.in | grep -v "%{name}" | tr -s " " | tr "," "\n" | cut -f2 -d " " | grep -v "^abrt" | sort -u | while read br; do if [ "%" = ${br:0:1} ]; then grep "%define ${br:2:-1}" *.spec.in | tr -s " " | cut -f4 -d" "; else echo $br ;fi ; done | tr "\n" " "`
}

case "$1" in
Expand Down
30 changes: 30 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,36 @@ else
AM_CONDITIONAL(BUILD_NEWT, false)
fi dnl end NO_NEWT

AC_ARG_WITH(rhtsupport,
AS_HELP_STRING([--with-rhtsupport],[use RHTSupport plugin (default is YES)]),
LIBREPORT_PARSE_WITH([rhtsupport]))
if test -z "$NO_RHTSUPPORT"; then
AM_CONDITIONAL(BUILD_RHTSUPPORT, true)
# enable rht & deps translations
for FILE in `grep -i -e "#.*rhtsupport.*" po/POTFILES.in`
do
sed -ie "s,$FILE,${FILE:1}," po/POTFILES.in
sed -ie "\,^${FILE:1}$,d" po/POTFILES.skip
done
else
AM_CONDITIONAL(BUILD_RHTSUPPORT, false)
# disable rhtsupport & deps translations
for FILE in `grep -i -e "rhtsupport" po/POTFILES.in`
do
if test "${FILE:0:1}" = "#"
then
continue
fi

sed -ie "s,$FILE,#$FILE," po/POTFILES.in
grep "$FILE" po/POTFILES.skip > /dev/null 2>&1
if test $?
then
echo "$FILE" >> po/POTFILES.skip
fi
done
fi dnl end NO_RHTSUPPORT

AC_ARG_WITH(gtk,
AS_HELP_STRING([--with-gtk],[use gtk wizard and libreport-gtk (default is YES)]),
LIBREPORT_PARSE_WITH([gtk]))
Expand Down
31 changes: 19 additions & 12 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,16 @@ XMLTO_SILENT_ = $(XMLTO_SILENT_$(AM_DEFAULT_VERBOSITY))
XMLTO_SILENT_0 = @echo " XMLTO " $@;

MAN1_TXT =
MAN5_TXT =

MAN1_TXT += report-cli.txt
MAN1_TXT += report-newt.txt
MAN1_TXT += report-gtk.txt

if BUILD_BUGZILLA
MAN1_TXT += reporter-bugzilla.txt
MAN1_TXT += report.txt
endif

MAN1_TXT += reporter-kerneloops.txt
MAN1_TXT += reporter-mailx.txt
MAN1_TXT += reporter-print.txt
MAN1_TXT += reporter-rhtsupport.txt
MAN1_TXT += reporter-upload.txt
MAN1_TXT += reporter-ureport.txt

MAN5_TXT =
MAN5_TXT += anaconda_event.conf.txt
MAN5_TXT += bugzilla_anaconda_event.conf.txt
MAN5_TXT += bugzilla.conf.txt
Expand All @@ -35,18 +28,32 @@ MAN5_TXT += bugzilla_formatdup_anaconda.conf.txt
MAN5_TXT += bugzilla_formatdup.conf.txt
MAN5_TXT += bugzilla_format_kernel.conf.txt
MAN5_TXT += bugzilla_format_libreport.conf.txt
MAN5_TXT += report_Bugzilla.conf.txt
endif

MAN1_TXT += reporter-kerneloops.txt
MAN1_TXT += reporter-mailx.txt
MAN1_TXT += reporter-print.txt

if BUILD_RHTSUPPORT
MAN1_TXT += reporter-rhtsupport.txt

MAN5_TXT += rhtsupport.conf.txt
MAN5_TXT += rhtsupport_event.conf.txt
endif

MAN1_TXT += reporter-upload.txt
MAN1_TXT += reporter-ureport.txt

MAN5_TXT += emergencyanalysis_event.conf.txt
MAN5_TXT += forbidden_words.conf.txt
MAN5_TXT += mailx.conf.txt
MAN5_TXT += mailx_event.conf.txt
MAN5_TXT += print_event.conf.txt
MAN5_TXT += report_Bugzilla.conf.txt
MAN5_TXT += report_event.conf.txt
MAN5_TXT += report_fedora.conf.txt
MAN5_TXT += report_Logger.conf.txt
MAN5_TXT += report_rhel.conf.txt
MAN5_TXT += rhtsupport.conf.txt
MAN5_TXT += rhtsupport_event.conf.txt
MAN5_TXT += uploader_event.conf.txt

# Manual pages are generated from .txt via Docbook
Expand Down
16 changes: 8 additions & 8 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ src/lib/parse_options.c
src/lib/problem_data.c
src/lib/run_event.c
src/plugins/abrt_rh_support.c
src/plugins/report_Bugzilla.xml.in
#src/plugins/report_Bugzilla.xml.in
src/plugins/report.c
src/plugins/reporter-bugzilla.c
#src/plugins/reporter-bugzilla.c
src/plugins/reporter-kerneloops.c
src/plugins/reporter-mailx.c
src/plugins/reporter-print.c
src/plugins/reporter-rhtsupport.c
src/plugins/reporter-rhtsupport-parse.c
#src/plugins/reporter-rhtsupport.c
#src/plugins/reporter-rhtsupport-parse.c
src/plugins/reporter-upload.c
src/plugins/report_Kerneloops.xml.in
src/plugins/report_Logger.xml.in
src/plugins/report_Mailx.xml.in
src/plugins/report_RHTSupport.xml.in
#src/plugins/report_RHTSupport.xml.in
src/plugins/report_Uploader.xml.in
src/plugins/report_uReport.xml.in
src/plugins/report_EmergencyAnalysis.xml.in
src/plugins/rhbz.c
src/plugins/ureport.c
src/report-newt/report-newt.c
src/workflows/workflow_AnacondaFedora.xml.in
src/workflows/workflow_AnacondaRHEL.xml.in
src/workflows/workflow_AnacondaUpload.xml.in
#src/workflows/workflow_AnacondaFedora.xml.in
#src/workflows/workflow_AnacondaRHEL.xml.in
#src/workflows/workflow_AnacondaUpload.xml.in
src/workflows/workflow_FedoraCCpp.xml.in
src/workflows/workflow_FedoraKerneloops.xml.in
src/workflows/workflow_FedoraPython.xml.in
Expand Down
8 changes: 8 additions & 0 deletions po/POTFILES.skip
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
contrib/command-not-found/pk-tools-common.c

src/plugins/report_Bugzilla.xml.in
src/plugins/reporter-bugzilla.c
src/workflows/workflow_AnacondaFedora.xml.in
src/workflows/workflow_AnacondaRHEL.xml.in
src/workflows/workflow_AnacondaUpload.xml.in
src/plugins/reporter-rhtsupport.c
src/plugins/reporter-rhtsupport-parse.c
src/plugins/report_RHTSupport.xml.in
30 changes: 24 additions & 6 deletions src/plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ if BUILD_UREPORT
reporters_bin += reporter-ureport
endif

if BUILD_RHTSUPPORT
reporters_bin += reporter-rhtsupport
endif

bin_PROGRAMS = $(reporters_bin) \
reporter-rhtsupport \
reporter-kerneloops \
reporter-upload \
reporter-mailx \
Expand All @@ -34,8 +37,11 @@ reporters_plugin_conf += bugzilla.conf \

endif

if BUILD_RHTSUPPORT
reporters_plugin_conf += rhtsupport.conf
endif

dist_reportpluginsconf_DATA = $(reporters_plugin_conf) \
rhtsupport.conf \
mailx.conf

eventsdir = $(EVENTS_DIR)
Expand All @@ -52,10 +58,13 @@ if BUILD_UREPORT
reporters_events += report_uReport.xml
endif

if BUILD_RHTSUPPORT
reporters_events += report_RHTSupport.xml
endif

dist_events_DATA = $(reporters_events) \
report_Logger.xml \
report_Mailx.xml \
report_RHTSupport.xml \
report_Kerneloops.xml \
report_Uploader.xml \
report_EmergencyAnalysis.xml
Expand All @@ -67,10 +76,14 @@ dist_eventsconf_DATA = $(reporters_events_conf) \

eventsdefdir = $(EVENTS_DEFINITION_DIR)

dist_eventsdef_DATA = \
reporters_events_def =
if BUILD_RHTSUPPORT
reporters_events_def += rhtsupport_event.conf
endif

dist_eventsdef_DATA = $(reporters_events_def) \
mailx_event.conf \
print_event.conf \
rhtsupport_event.conf \
uploader_event.conf \
emergencyanalysis_event.conf

Expand All @@ -84,11 +97,14 @@ if BUILD_UREPORT
reporters_extra_dist += report_uReport.xml.in
endif

if BUILD_RHTSUPPORT
reporters_extra_dist += report_RHTSupport.xml.in
endif

EXTRA_DIST = $(reporters_extra_dist) \
report_Logger.conf \
report_Logger.xml.in \
report_Mailx.xml.in \
report_RHTSupport.xml.in \
report_Kerneloops.xml.in \
report_Uploader.xml.in \
report_EmergencyAnalysis.xml.in
Expand Down Expand Up @@ -120,6 +136,7 @@ reporter_bugzilla_LDADD = \
../lib/libreport.la
endif

if BUILD_RHTSUPPORT
reporter_rhtsupport_SOURCES = \
abrt_rh_support.h abrt_rh_support.c \
reporter-rhtsupport.h \
Expand All @@ -146,6 +163,7 @@ reporter_rhtsupport_LDADD = \
$(LIBXML_LIBS) \
../lib/libreport-web.la \
../lib/libreport.la
endif

reporter_upload_SOURCES = \
reporter-upload.c
Expand Down

0 comments on commit 2d9209b

Please sign in to comment.