Răsfoiți Sursa

build: fix make dist and make rpm

do some cleanup around to include all files that need to be shipped
and honor conditional builds properly

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
Fabio M. Di Nitto 14 ani în urmă
părinte
comite
ab9986cb96
4 a modificat fișierele cu 48 adăugiri și 38 ștergeri
  1. 2 26
      Makefile.am
  2. 33 6
      conf/Makefile.am
  3. 5 0
      corosync.spec.in
  4. 8 6
      man/Makefile.am

+ 2 - 26
Makefile.am

@@ -33,14 +33,11 @@ SPEC			= $(PACKAGE_NAME).spec
 
 TARFILE			= $(PACKAGE_NAME)-$(VERSION).tar.gz
 
-EXTRA_DIST		= autogen.sh conf/corosync.conf.example $(SPEC).in \
+EXTRA_DIST		= autogen.sh $(SPEC).in \
 			  build-aux/git-version-gen \
 			  build-aux/gitlog-to-changelog \
 			  build-aux/release.mk \
-			  conf/lenses/tests/test_corosync.aug \
-			  conf/lenses/corosync.aug \
-			  conf/corosync.conf.example.udpu \
-			  .version conf/corosync.xml.example
+			  .version
 
 AUTOMAKE_OPTIONS	= foreign
 
@@ -50,27 +47,6 @@ MAINTAINERCLEANFILES	= Makefile.in aclocal.m4 configure depcomp \
 
 dist_doc_DATA		= LICENSE INSTALL README.recovery SECURITY TODO AUTHORS
 
-corosysconfdir		= ${COROSYSCONFDIR}
-
-corosysconf_DATA	= conf/corosync.conf.example \
-			  conf/corosync.conf.example.udpu
-
-if INSTALL_AUGEAS
-corolensdir		= ${datadir}/augeas/lenses
-corolens_DATA		= conf/lenses/corosync.aug
-
-corolenstestdir		= ${corolensdir}/tests
-corolenstest_DATA	= conf/lenses/tests/test_corosync.aug
-endif
-
-if INSTALL_XMLCONF
-corosysxmlconfdir	= ${COROSYSCONFDIR}
-corosysxmlconf_DATA	= conf/corosync.xml.example
-
-corosysxmlxsltdir	= ${datadir}/corosync
-corosysxmlxslt_DATA	= conf/xml2conf.xsl
-endif
-
 SUBDIRS			= include lib exec tools test cts pkgconfig \
 			  man init conf
 

+ 33 - 6
conf/Makefile.am

@@ -29,16 +29,43 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-EXTRA_DIST     = COROSYNC-MIB.txt corosync-signals.conf
-
 MAINTAINERCLEANFILES    = Makefile.in
 
+EXTRA_DIST		= COROSYNC-MIB.txt corosync-signals.conf \
+			  corosync.conf.example \
+			  corosync.conf.example.udpu \
+			  corosync.xml.example \
+			  xml2conf.xsl \
+			  lenses/corosync.aug \
+			  lenses/tests/test_corosync.aug
+
+corosysconfdir		= ${COROSYSCONFDIR}
+
+corosysconf_DATA	= corosync.conf.example \
+			  corosync.conf.example.udpu
+
+if INSTALL_AUGEAS
+corolensdir		= ${datadir}/augeas/lenses
+corolens_DATA		= lenses/corosync.aug
+
+corolenstestdir		= ${corolensdir}/tests
+corolenstest_DATA	= lenses/tests/test_corosync.aug
+endif
+
+if INSTALL_XMLCONF
+corosysxmlconfdir	= ${COROSYSCONFDIR}
+corosysxmlconf_DATA	= corosync.xml.example
+
+corosysxmlxsltdir	= ${datadir}/corosync
+corosysxmlxslt_DATA	= xml2conf.xsl
+endif
+
 if INSTALL_MIB
-mibdir = $(datadir)/snmp/mibs
-mib_DATA = COROSYNC-MIB.txt
+mibdir			= $(datadir)/snmp/mibs
+mib_DATA		= COROSYNC-MIB.txt
 endif
 
 if INSTALL_DBUSCONF
-dbusdir = $(sysconfdir)/dbus-1/system.d
-dbus_DATA = corosync-signals.conf
+dbusdir			= $(sysconfdir)/dbus-1/system.d
+dbus_DATA		= corosync-signals.conf
 endif

+ 5 - 0
corosync.spec.in

@@ -155,6 +155,11 @@ fi
 %{_bindir}/corosync-blackbox
 %if %{with xmlconf}
 %{_bindir}/corosync-xmlproc
+%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
+%dir %{_datadir}/corosync
+%dir %{_datadir}/corosync/xml2conf.xsl
+%{_mandir}/man8/corosync-xmlproc.8*
+%{_mandir}/man5/corosync.xml.5*
 %endif
 %dir %{_sysconfdir}/corosync
 %dir %{_sysconfdir}/corosync/uidgid.d

+ 8 - 6
man/Makefile.am

@@ -34,7 +34,13 @@
 
 MAINTAINERCLEANFILES	= Makefile.in
 
-EXTRA_DIST		= index.html
+xml_man			= corosync-xmlproc.8 \
+			  corosync.xml.5
+
+INDEX_HTML		= index.html
+
+EXTRA_DIST		= $(INDEX_HTML) \
+			  $(xml_man)
 
 dist_man_MANS = \
 	corosync.conf.5 \
@@ -114,17 +120,13 @@ dist_man_MANS = \
 	sam_warn_signal_set.3
 
 if INSTALL_XMLCONF
-dist_man_MANS += \
-	corosync-xmlproc.8 \
-	corosync.xml.5
+dist_man_MANS += $(xml_man)
 endif
 
 if BUILD_HTML_DOCS
 
 HTML_DOCS = $(dist_man_MANS:%=%.html)
 
-INDEX_HTML = index.html
-
 %.html: %
 	$(GROFF) -mandoc -Thtml $^ > $@