diff --git a/0001-Use-XSL-to-generate-man-page-from-the-rules-XML.patch b/0001-Use-XSL-to-generate-man-page-from-the-rules-XML.patch new file mode 100644 index 0000000..72184ba --- /dev/null +++ b/0001-Use-XSL-to-generate-man-page-from-the-rules-XML.patch @@ -0,0 +1,230 @@ +From c17f8b08740aed26687fd65c84e654a6cdc163a2 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 13 Jun 2011 23:39:30 +0100 +Subject: [PATCH] Use XSL to generate man page from the rules XML + +Generate a man-page from the evdev.xml through the xslt/man.xsl stylesheet. + +Adds a requirement on the xorg util-macros and xsltproc. + +Signed-off-by: Peter Hutterer +Reviewed-by: Dan Nicholson +Reviewed-by: Gaetan Nadon +--- + Makefile.am | 2 +- + configure.in | 10 ++++ + man/Makefile.am | 17 +++++++ + man/man.xsl | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 165 insertions(+), 1 deletions(-) + create mode 100644 man/Makefile.am + create mode 100644 man/man.xsl + +diff --git a/Makefile.am b/Makefile.am +index e98117e..943539f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = compat geometry keycodes keymap po rules semantics symbols types docs ++SUBDIRS = compat geometry keycodes keymap po rules semantics symbols types docs man + + pkgconfigdir = $(datadir)/pkgconfig + pkgconfig_DATA = xkeyboard-config.pc +diff --git a/configure.in b/configure.in +index 527e807..e98919a 100644 +--- a/configure.in ++++ b/configure.in +@@ -3,6 +3,15 @@ AC_CONFIG_SRCDIR(rules/base.xml.in) + AM_INIT_AUTOMAKE([foreign dist-bzip2]) + AM_MAINTAINER_MODE + ++# Require X.Org macros 1.12 or later for XORG_WITH_XSLTPROC ++m4_ifndef([XORG_MACROS_VERSION], ++ [m4_fatal([must install xorg-macros 1.12 or later before ++ running autoconf/autogen])]) ++XORG_MACROS_VERSION(1.12) ++XORG_MANPAGE_SECTIONS ++XORG_WITH_XSLTPROC ++AC_PROG_SED ++ + AC_SUBST(VERSION) + + AC_PATH_PROG([XKBCOMP], [xkbcomp], [not_found]) +@@ -104,6 +113,7 @@ types/Makefile + xkeyboard-config.pc + xkeyboard-config.spec + docs/Makefile ++man/Makefile + ]) + + echo '***********************************************************' +diff --git a/man/Makefile.am b/man/Makefile.am +new file mode 100644 +index 0000000..2e9deaa +--- /dev/null ++++ b/man/Makefile.am +@@ -0,0 +1,17 @@ ++EXTRA_DIST = man.xsl ++ ++if HAVE_XSLTPROC ++miscmandir = $(MISC_MAN_DIR) ++miscman_PRE = xkeyboard-config.man ++miscman_DATA = $(miscman_PRE:man=@MISC_MAN_SUFFIX@) ++CLEANFILES = $(miscman_DATA) $(miscman_PRE) ++SUFFIXES = .$(MISC_MAN_SUFFIX) .man ++MAN_SUBSTS += -e 's|__xkb_base__|$(xkb_base)|g' ++ ++xkeyboard-config.man: $(top_builddir)/rules/evdev.xml $(srcdir)/man.xsl ++ $(XSLTPROC) -nonet $(srcdir)/man.xsl $(top_builddir)/rules/evdev.xml > $@ ++ ++.man.$(MISC_MAN_SUFFIX): ++ $(SED) $(MAN_SUBSTS) < $< > $@ ++ ++endif +diff --git a/man/man.xsl b/man/man.xsl +new file mode 100644 +index 0000000..a5bd14d +--- /dev/null ++++ b/man/man.xsl +@@ -0,0 +1,137 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ( ++ ++ ) ++ ++ ++ ++ ++ ++ _ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +1.7.5.4 + diff --git a/xkeyboard-config.spec b/xkeyboard-config.spec index 5440a1a..eca0a9f 100644 --- a/xkeyboard-config.spec +++ b/xkeyboard-config.spec @@ -7,7 +7,7 @@ Summary: X Keyboard Extension configuration data Name: xkeyboard-config Version: 2.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{dist} License: MIT Group: User Interface/X URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig @@ -18,6 +18,7 @@ Source2: commitid %else Source0: ftp://ftp.x.org/pub/individual/data/%{name}/%{name}-%{version}.tar.bz2 %endif +Patch01: 0001-Use-XSL-to-generate-man-page-from-the-rules-XML.patch BuildArch: noarch @@ -31,6 +32,7 @@ BuildRequires: git-core BuildRequires: automake autoconf libtool pkgconfig BuildRequires: glib2-devel BuildRequires: xorg-x11-proto-devel libX11-devel +BuildRequires: libxslt %description This package contains configuration data used by the X Keyboard Extension @@ -56,15 +58,18 @@ if [ -z "$GIT_COMMITTER_NAME" ]; then git config user.email "x@fedoraproject.org" git config user.name "Fedora X Ninjas" fi +git commit -am "%{name} %{version}" %else git init if [ -z "$GIT_COMMITTER_NAME" ]; then git config user.email "x@fedoraproject.org" git config user.name "Fedora X Ninjas" fi +git add . +git commit -a -q -m "%{name} %{version} baseline." %endif -#git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec) +git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec) %build intltoolize @@ -99,12 +104,18 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled %{_datadir}/X11/xkb/rules/xorg %{_datadir}/X11/xkb/rules/xorg.lst %{_datadir}/X11/xkb/rules/xorg.xml +%{_mandir}/man7/xkeyboard-config.* %files devel %defattr(-,root,root,-) %{_datadir}/pkgconfig/xkeyboard-config.pc %changelog +* Tue Jun 14 2011 Peter Hutterer 2.3-2 +- Add 0001-Use-XSL-to-generate-man-page-from-the-rules-XML.patch, ship + man-page +- Fix up broken git repo initialization when building from a tarball + * Thu Jun 02 2011 Peter Hutterer 2.3-1 - xkeyboard-config 2.3