debian/0000755000000000000000000000000012207440514007165 5ustar debian/build_tools.gpr0000644000000000000000000000241312207404375012223 0ustar -- Templates Parser library build project file. -- Copyright (c) 2013 Nicolas Boulenguez -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. with "build"; project Build_Tools is for Source_Dirs use ("../tools"); for Object_Dir use "build_obj_dynamic"; for Main use ("templates2ada", "templatespp"); package Compiler is for Default_Switches ("Ada") use External_As_list ("ADAFLAGS", " ") & ("-gnatwcfijkmruv", "-gnaty3abcefhiIklmnoprstx", "-Wall"); -- Inlining will be useful, but #642981 has to disappear first. end Compiler; package Binder is for Default_Switches ("Ada") use ("-E"); end Binder; package Linker is for Default_Switches ("Ada") use External_As_list ("LDFLAGS", " "); end Linker; end Build_Tools; debian/control0000644000000000000000000000750112207404375010600 0ustar Source: libtemplates-parser Section: libdevel Priority: optional Maintainer: Ludovic Brenta Uploaders: Xavier Grave , Nicolas Boulenguez Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), gnat, gnat-4.6 (>= 4.6.1-6), dh-ada-library (>= 5.5), libxmlada4.1-dev # dpkg-dev 1.16.1 provides /usr/share/dpkg/default.mk # dh-ada-library 5.5 stops linking doc dirs, installs sources read-only, # strips binaries other than the usual libraries. Build-Depends-Indep: texinfo, mawk | awk, texlive-generic-recommended, texlive-fonts-recommended, texlive-latex-base # awk is used by docs/gentexifile when available. Standards-Version: 3.9.4 Homepage: http://libre.adacore.com Vcs-Browser: http://www.ada-france.org:8081/branch/changes/org.debian.libtemplates-parser Vcs-Mtn: www.ada-france.org org.debian.libtemplates-parser XS-Testsuite: autopkgtest Package: libtemplates-parser11.6-dev Architecture: any Depends: ${ada:Depends}, ${shlibs:Depends}, ${misc:Depends} Breaks: libtemplates-parser-dev Replaces: libtemplates-parser-dev Recommends: libtemplates-parser-doc Description: Ada library to parse files and replace variables The main goal is to ease the development of Web servers. In CGI (Common Gateway Interface) applications, you have to write HTML pages in the program (in Ada or whatever other language) by using some specific libraries or by using only basic output functions. This is of course not mandatory but by lack of a good library every Web development ends up doing just that. Templates Parser takes that burden off of you. . This package contains the static libraries, documentation, tools and Ada specification files. Package: libtemplates-parser11.6 Section: libs Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same Description: Ada library to parse files and replace variables (runtime) The main goal is to ease the development of Web servers. In CGI (Common Gateway Interface) applications, you have to write HTML pages in the program (in Ada or whatever other language) by using some specific libraries or by using only basic output functions. This is of course not mandatory but by lack of a good library every Web development ends up doing just that. Templates Parser takes that burden off of you. . This package contains the runtime shared library. Package: libtemplates-parser11.6-dbg Section: debug Priority: extra Architecture: any Multi-Arch: same Depends: ${ada:Depends}, ${misc:Depends} Recommends: ${ada:Recommends} Suggests: ${ada:Suggests} Description: Ada library to parse files and replace variables (debugging symbols) The main goal is to ease the development of Web servers. In CGI (Common Gateway Interface) applications, you have to write HTML pages in the program (in Ada or whatever other language) by using some specific libraries or by using only basic output functions. This is of course not mandatory but by lack of a good library every Web development ends up doing just that. Templates Parser takes that burden off of you. . This package contains the detached debugging symbols for the shared library. Package: libtemplates-parser-doc Section: doc Architecture: all Depends: ${misc:Depends} Suggests: gnat Description: Ada library to parse files and replace variables (documentation) The main goal is to ease the development of Web servers. In CGI (Common Gateway Interface) applications, you have to write HTML pages in the program (in Ada or whatever other language) by using some specific libraries or by using only basic output functions. This is of course not mandatory but by lack of a good library every Web development ends up doing just that. Templates Parser takes that burden off of you. . This package contains the documentation for developers using the library. debian/libtemplates-parser-doc.examples0000644000000000000000000000006712207404375015457 0ustar tools/templates.tads docs/all_sources.ada docs/*.tmplt debian/libtemplates-parser-doc.info0000644000000000000000000000003312207404375014565 0ustar docs/templates_parser.info debian/libtemplates-parser-doc.docs0000644000000000000000000000011712207404375014565 0ustar docs/templates_parser.html docs/templates_parser.pdf docs/templates_parser.txt debian/copyright0000644000000000000000000000545612207404375011137 0ustar Templates Parser is Copyright (c) 1999-2004 Pascal Obry Copyright (c) 2005-2006 AdaCore It is available from AdaCore's CVS server at http://libre.adacore.com. License terms for the documentation: This document may be copied, in whole or in part, in any form or by any means, as is or with alterations, provided that (1) alterations are clearly marked as alterations and (2) this copyright notice is included unmodified in any copy. License terms for the library: This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian GNU/Linux systems, the full text of the GPL is in the file /usr/share/common-licenses/GPL-2. Maintainer's note: If you obtain Templates Parser from AdaCore's CVS server, you might notice that the source files still carry the following text: As a special exception, if other files instantiate generics from this unit, or you link this unit with other files to produce an executable, this unit does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. However, AdaCore insist that everything obtained from their web or CVS servers is licensed under the terms of the pure GPL, explained above. As a result, if you use Templates Parser in your program or libraries, you have four options: - do not distribute your program at all (you can always use it for yourself). - distribute your program under the terms of the GPL, i.e. with full sources and the four freedoms: inspection, redistribution, modification, and distribution of modified copies. - distribute your program in source form only, under licensing terms of your choosing (perhaps under non-disclosure, non-redistribution terms), and ask your licensees to recompile your program for themselves. - contact AdaCore (sales@adacore.com) and purchase a GNAT-Modified GPL which will allow you to distribute your program in binary-only form without disclosing your sources. In order to reduce the potential for confusion, I have removed the "special exception" text from all source files. -- Ludovic Brenta, 2006-07-18 debian/source/0000755000000000000000000000000012207404375010472 5ustar debian/source/format0000644000000000000000000000001412207404375011700 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000001664112207440453011051 0ustar libtemplates-parser (11.6-4) unstable; urgency=low * Linker option avoiding FTBFS on arm* because of gnat bug #687642. -- Nicolas Boulenguez Wed, 28 Aug 2013 20:24:38 +0200 libtemplates-parser (11.6-3) unstable; urgency=low * Switch to dpkg-source 3.0 (quilt) format. * Ignore complex and unconfigurable upstream build system for most targets. * Autopkg tests. * Switch to debhelper 9. * Use multiarch paths, generate the system project accordingly. * Use dh-ada-library to simplify debian/rules. Lintian override: generated lib->dbg dependency reported as missing. When many implementation, only install the one used to build. -dev: depends on xmlada-dev, not the library. * texinfo5.patch: Closes: #707517. Avoid recompiling the library for the examples. Do not embed unused css in documentation. Install doc programs as examples (without execution permission). * Upstream changelog. Doc-base registration. Informative watch file. * Explicit Build-Depends-Indep: mawk | awk. -- Nicolas Boulenguez Tue, 27 Aug 2013 06:56:00 +0200 libtemplates-parser (11.6-2) unstable; urgency=low * Tighten build dependency on gnat-4.6 (>= 4.6.1-6). Fixes FTBFS on kfreebsd-amd64, kfreebsd-i386. * debian/patches/disable-inlining.diff: new; work around compiler bug #642981 on armel. * debian/rules (clean): adjust to the new upstream version. -- Ludovic Brenta Mon, 3 Oct 2011 01:01:11 +0200 libtemplates-parser (11.6-1) unstable; urgency=low [Xavier Grave] * new upstream version 11.6 - remove executable bit in *.ad[sb] files in the installed packages * add get-orig-source target - use bdf9f07b1b98db7064abab7564892a9736b2edd9 of com.adacore.templates_parser.debian * remove unused build.gpr file * Take new gcc-multilib scheme into account - put libs in /usr/lib/$(DEB_HOST_MULTIHARCH) - modify control and lintian files accordingly [Ludovic Brenta] * debian/control (Architectures): any. (Uploaders): add Xavier. (DM-Upload-Allowed): yes. -- Xavier Grave Mon, 12 Sep 2011 16:48:49 +0200 libtemplates-parser (11.5-4) unstable; urgency=low * debian/control (*-dev): depend on gnat, ada-compiler. (*-dbg, *-doc): suggest gnat, gnat-4.4, ada-compiler. (*-doc): add ${misc:Depends} to Depends (lintian warning). (Standards-Version): update to 3.8.4 with no changes required. [Xavier Grave] * debian/patches/makefile-multicore.patch: new, use one compiler job per processor core present in the system instead of hardcoded 2. -- Ludovic Brenta Sun, 13 Jun 2010 17:59:18 +0200 libtemplates-parser (11.5-3) unstable; urgency=medium * debian/control (Architectures): - temporarily disable mips due to #566234. - add armel. Closes: #568444. - s/docs/doc/. Closes: #568474. -- Ludovic Brenta Sun, 7 Feb 2010 22:55:42 +0100 libtemplates-parser (11.5-2) unstable; urgency=low * templates_parser.gpr: new Naming package to let applications find templates_parser-configuration__standalone.ads. * Split the documentation into a new package. * debian/control (Build-Depends-Indep): new. * debian/rules: support dpkg-buildpackage -A, -B. * debian/patches/GPL.patch: new, the GPL also applies to the doc. -- Ludovic Brenta Thu, 31 Dec 2009 23:51:53 +0100 libtemplates-parser (11.5-1) unstable; urgency=low * New upstream version (Subversion revision 145737). * Set aliversion=11.5, soversion=11.5 per Debian Policy for Ada. * Package renamings: libtemplates-parser-dev -> libtemplates-parser11.5-dev (with Conflicts: and Replaces:) libtemplates-parser11 -> libtemplates-parser11.5 libtemplates-parser11-dbg -> libtemplates-parser11.5-dbg * Build-Depend and Depend on gnat-4.4 instead of gnat-4.3. * Build-Depend on libxmlada3.2-dev instead of libxmlada-dev. * Drop support for alpha due to http://gcc.gnu.org/PR42073. * debian/rules: parse the aliversion and soversion from debian/control. * debian/patches/GPL.patch: remove; merged into the .orig.tar.gz. * debian/patches/library_version.patch: adjust. -- Ludovic Brenta Tue, 1 Dec 2009 22:19:20 +0100 libtemplates-parser (11.1-3) unstable; urgency=low * Tighten build-dependency on libxmlada-dev to (>= 3.0-6) to force a recompile. -- Ludovic Brenta Sun, 13 Sep 2009 16:22:42 +0200 libtemplates-parser (11.1-2) unstable; urgency=low * debian/control (Architecture): add kfreebsd-amd64. Closes: #542415. (Depends): add ${misc:Depends} for proper support for debhelper. s/source:Version/binary:Version/g. (Standards-Version): bump to 3.8.3. (libtemplates_parser11-dbg): new package containing the detached debugging symbols. * debian/compat: bump to 7. * patches: move to debian/patches; adjust all patches to quilt -p ab. * debian/rules: adjust to source format 3.0 (quilt). * debian/clean: new. -- Ludovic Brenta Sun, 13 Sep 2009 15:20:22 +0200 libtemplates-parser (11.1-1) unstable; urgency=low * New upstream release. * Change soname to libtemplates_parser.so.11, and binary package name to match. * debian/control: update Standards-Version to 2.7.3 with no changes. Migrate to gnat-4.3. Migrate to texlive-{generic,fonts}-recommended and texlive-latex-base. Add support for mips, mipsel and ppc64. * debian/compat: new. * debian/rules: do not export DH_COMPAT anymore. Use upstream's library project files to build, instead of our own. * debian/templates_parser.gpr: turn into a library project file. * patches/make.patch: new; when executing programs compiled as part of the doc, look for libtemplates_parser.so in the proper place. * patches/library-version.patch: new; specify the soname of the shared library. * debian/templates2ada.1, debian/templatespp.1: new. * patches/GPL.patch: new; remove the GMGPL special exception text from generated documentation, too. -- Ludovic Brenta Wed, 14 May 2008 21:42:30 +0200 libtemplates-parser (10.0+20080424-1) unstable; urgency=low * compilation with last svn sources and gnat-4.3 -- Xavier Grave Thu, 24 Apr 2008 10:38:00 +0200 libtemplates-parser (10.0+20060522-5) unstable; urgency=low * debian/rules: add an empty binary-indep target. Closes: #395713. -- Ludovic Brenta Sun, 29 Oct 2006 00:58:25 +0200 libtemplates-parser (10.0+20060522-4) unstable; urgency=low * debian/control: add alpha and s390, as libgnat now exists on these archs. Closes: #380572. * debian/rules: use /bin/bash explicitly. Closes: #380615. -- Ludovic Brenta Mon, 7 Aug 2006 18:19:32 +0200 libtemplates-parser (10.0+20060522-3) unstable; urgency=low * debian/control build-depend on texinfo. -- Ludovic Brenta Fri, 28 Jul 2006 20:39:39 +0200 libtemplates-parser (10.0+20060522-2) unstable; urgency=low * debian/rules: chmod docs/gentexifiles to be executable, fixes FTBFS. -- Ludovic Brenta Fri, 28 Jul 2006 20:13:50 +0200 libtemplates-parser (10.0+20060522-1) unstable; urgency=low * Initial version, to be used in both AWS and GPS. -- Ludovic Brenta Thu, 20 Jul 2006 01:14:04 +0200 Local variables: left-margin: 2 End: debian/rules0000755000000000000000000001250412207440457010255 0ustar #!/usr/bin/make -f # Build script for Templates_Parser in Debian. # Copyright (c) 2003-2008 Ludovic Brenta # Copyright (c) 2013 Nicolas Boulenguez # This build script is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # USA # On Debian systems, the full text of the GPL is in the file # /usr/share/common-licenses/GPL-2. include /usr/share/dpkg/default.mk include /usr/share/ada/debian_packaging.mk LDFLAGS += -l:libgnarl-4.6.so # avoids FTBFS on arm* because of gnat bug #687642 ALIVERSION := $(shell sed --quiet -r 's/^Package: $(DEB_SOURCE)([0-9.]+)-dev$$/\1/p' debian/control) SOVERSION := $(shell sed --quiet -r 's/^Package: $(DEB_SOURCE)([0-9.]+)$$/\1/p' debian/control) mtnbase := base_debian.db mtnversion := bdf9f07b1b98db7064abab7564892a9736b2edd9 branch := com.adacore.templates_parser.debian orig_dir := $(DEB_SOURCE)_$(ALIVERSION).orig orig_tgz := $(DEB_SOURCE)_$(ALIVERSION).orig.tar.gz SONAME := $(subst -,_,$(DEB_SOURCE)).so.$(SOVERSION) ###################################################################### POLICY_TARGETS := binary binary-arch binary-indep build build-arch \ build-indep clean .PHONY: $(POLICY_TARGETS) $(POLICY_TARGETS): dh $@ --with ada-library # Ignore upstream build system. override_dh_auto_configure: override_dh_auto_build-arch: override_dh_auto_build-indep: override_dh_auto_test: override_dh_auto_install: override_dh_auto_clean:: ###################################################################### get-orig-source: if [ ! -e ../$(mtnbase) ]; then \ mtn -d../$(mtnbase) db init; \ fi; \ mtn -d../$(mtnbase) -k "" pull www.ada-france.org '$(branch)'; \ cd .. && \ mtn -d$(mtnbase) co -r$(mtnversion) -b$(branch) $(orig_dir) && \ rm -rf $(orig_dir)/_MTN $(orig_dir)/.*ignore&& \ tar czf $(orig_tgz) $(orig_dir) && \ rm -r $(orig_dir) ###################################################################### # The static archive is needed to generate the docs, so for testing # the -indep target it is convenient to have a separate subtarget. build_static_archive: gnatmake $(BUILDER_OPTIONS) -Pdebian/build.gpr -XKIND=static \ $(foreach v,ADAFLAGS,-X$(v)="$($(v))") override_dh_auto_build-arch: build_static_archive gnatmake $(BUILDER_OPTIONS) -Pdebian/build.gpr -XKIND=dynamic \ $(foreach v,ADAFLAGS LDFLAGS SONAME,-X$(v)="$($(v))") gnatmake $(BUILDER_OPTIONS) -Pdebian/build_tools.gpr -XKIND=dynamic \ $(foreach v,ADAFLAGS LDFLAGS SONAME,-X$(v)="$($(v))") override_dh_auto_clean:: rm -f $(foreach d,lib obj,$(foreach k,dynamic static,debian/build_$(d)_$(k)/*)) ###################################################################### DOC_MAINS := $(shell sed -n -e "s/^procedure \(\w\+\) is$$/\L\1/gp" docs/all_sources.ada) override_dh_auto_build-indep: build_static_archive # This part of the upstream build system is too complicated to # seriously consider configuring it, even with patches. I want to set # my CFLAGS, I do not want to compile the library a third time. gnatchop -w docs/all_sources.ada docs gnatmake $(BUILDER_OPTIONS) -Pdebian/build_docs.gpr -XKIND=static \ $(foreach v,ADAFLAGS DOC_MAINS LDFLAGS,"-X$(v)=$($(v))") # What remains can be patched. $(MAKE) -C docs override_dh_auto_clean:: rm -f $(addprefix docs/, $(foreach m, $(DOC_MAINS) \ ,$(m).adb $(m).ali $(m).o $(m) $(m).adb.res $(m).adb.texi)) rm -f $(foreach t,$(DOC_MAINS) table_block user,docs/$(t).tmplt.texi) rm -f $(foreach ext,ads.texi html info pdf txt,docs/templates_parser.$(ext)) rm -f $(foreach sub,debug utils xml,docs/templates_parser-$(sub).ads.texi) rm -f ada.sed ###################################################################### override_dh_installchangelogs: dh_installchangelogs --package=libtemplates-parser-doc src/ChangeLog dh_installchangelogs --remaining-packages DOC_PKG := libtemplates-parser-doc EXAMPLES_DIR := debian/$(DOC_PKG)/usr/share/doc/$(DOC_PKG)/examples override_dh_fixperms-arch: if [ -d $(EXAMPLES_DIR) ]; then \ chmod ugo-x $(EXAMPLES_DIR)/*.tmplt; \ fi dh_fixperms --all override_dh_compress: dh_compress --all --exclude=examples/templates.tads ###################################################################### RUN_TESTS_TMP := $(DEB_SOURCE)-run-tests-XXXXXXXXXX TESTS := $(addprefix test_, \ link-with-shared \ templatespp) run-tests: $(TESTS) $(TESTS): test_%: ADTTMP=`mktemp --tmpdir --directory $(RUN_TESTS_TMP)` && \ ADTTMP=$$ADTTMP sh debian/tests/$* 2> $$ADTTMP/stderr; \ status=$$?; cat $$ADTTMP/stderr; \ if test $$status != 0; then \ echo "Test failed: non zero exit status ($$status)."; \ elif test -s $$ADTTMP/stderr; then \ echo "Test failed: activity on stderr."; \ fi; \ rm -f -r $$ADTTMP debian/build_lib_static/0000755000000000000000000000000012207404375012466 5ustar debian/source.lintian-overrides0000644000000000000000000000035412207404375014054 0ustar # This dependency has a versioned name per debian-ada-policy, so we # generate it at build time via deb-substvars. This causes a lintian # false positive. libtemplates-parser source: dbg-package-missing-depends libtemplates-parser*-dbg debian/build_obj_static/0000755000000000000000000000000012207404375012472 5ustar debian/build_obj_dynamic/0000755000000000000000000000000012207404375012627 5ustar debian/build_lib_dynamic/0000755000000000000000000000000012207404375012623 5ustar debian/install0000644000000000000000000000014012207404375010556 0ustar debian/build_obj_dynamic/templates2ada usr/bin debian/build_obj_dynamic/templatespp usr/bin debian/clean0000644000000000000000000000001612207404375010174 0ustar tp_shared.gpr debian/manpages0000644000000000000000000000005412207404375010707 0ustar debian/templates2ada.1 debian/templatespp.1 debian/libtemplates-parser-doc.doc-base.templates-parser0000644000000000000000000000131412207404375020601 0ustar Document: templates-parser Title: The Templates Parser Ada library Author: Pascal Obry (from Adacore) Abstract: This user guide documents the Templates Parser Ada library, allowing the programmer to conveniently parse files and replace variables with their values. Section: Programming Format: HTML Index: /usr/share/doc/libtemplates-parser-doc/templates_parser.html Files: /usr/share/doc/libtemplates-parser-doc/templates_parser.html Format: text Files: /usr/share/doc/libtemplates-parser-doc/templates_parser.txt.gz Format: pdf Files: /usr/share/doc/libtemplates-parser-doc/templates_parser.pdf.gz Format: info Index : /usr/share/info/templates_parser.info.gz Files: /usr/share/info/templates_parser.info.gz debian/patches/0000755000000000000000000000000012207404375010621 5ustar debian/patches/series0000644000000000000000000000007312207404375012036 0ustar info-dir-section.patch make.patch GPL.patch texinfo5.patch debian/patches/GPL.patch0000644000000000000000000000271712207404375012273 0ustar Description: Update documentation license. See debian/copyright. Author: Ludovic Brenta --- a/docs/templates_parser.texi +++ b/docs/templates_parser.texi @@ -6,6 +6,26 @@ @setchapternewpage off @syncodeindex fn cp +@copying +Copyright @copyright{} 1999-2004, Pascal Obry + +Copyright @copyright{} 2005-2008, AdaCore + +This document is free; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This document is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +@end copying + @iftex @afourpaper @end iftex @@ -53,16 +73,10 @@ @page -Copyright @copyright{} 1999-2004, Pascal Obry - -Copyright @copyright{} 2005-2010, AdaCore +@insertcopying @* -This document may be copied, in whole or in part, in any form or by any -means, as is or with alterations, provided that (1) alterations are clearly -marked as alterations and (2) this copyright notice is included -unmodified in any copy. @end titlepage debian/patches/info-dir-section.patch0000644000000000000000000000070512207404375015015 0ustar Author: Ludovic Brenta Description: add dircategory and dirsection to info page. --- a/docs/templates_parser.texi +++ b/docs/templates_parser.texi @@ -35,6 +35,11 @@ @c ----------------------------------------- END MACRO +@dircategory GNU Ada tools +@direntry +* Templates Parser: (templates_parser). Parse files and replace variables with their values. +@end direntry + @titlepage @title Templates Parser User's Guide debian/patches/texinfo5.patch0000644000000000000000000000307612207404375013411 0ustar Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707517 Description: handle texinfo 5 incompatibilities Move some parenthesis to please version 5 of texinfo. Author: Nicolas Boulenguez --- a/docs/templates_parser.texi +++ b/docs/templates_parser.texi @@ -1869,8 +1869,7 @@ default output of @file{templates2ada}, which can be fully tailored to your needs. -@TPEXP -{@b{package} Templates.Block1 @b{is} +@TPEXP{@b{package} Templates.Block1 @b{is} pragma Style_Checks (Off); Template : constant string := "resources/block1.thtml"; Tag1 : constant String := "TAG1"; @@ -1941,8 +1940,7 @@ you should run @code{gnatchop} on the resulting file. Here is an example to run this tool for the example we described above. -@TPEXP -{$ rm -f src/templates/*.ads +@TPEXP{$ rm -f src/templates/*.ads $ templates2ada -d resources/ -o src/templates/generated -r $ cd src/templates; gnatchop -w -q generated $ rm -f src/templates/generated} @@ -1959,8 +1957,7 @@ For instance, if you are using GNAT, we recommend the following additional targets in your @file{Makefile}: -@TPEXP -{ unset_tags: +@TPEXP{ unset_tags: gnat xref -u main.adb | fgrep templates-} This checks for all unused entities in files called @file{templates-*}, @@ -1979,8 +1976,7 @@ which can be used with the @code{-t} switch to @code{templates2ada}, and will generated a template file as output. You would use it as: -@TPEXP -{@@@@INCLUDE@@@@ all_urls.html +@TPEXP{@@@@INCLUDE@@@@ all_urls.html } @noindent debian/patches/make.patch0000644000000000000000000000601012207404375012554 0ustar Description: Correct most evident failures of doc dir Makefile. Cut the part triggering recompilation, as debian/rules circumvents it. . Ask for echo of executed commands. . Do not consider any file as executable. . Remove temporary files. It is convenient to change the name of the genout tempfile in order to keep the version that was embedded into the tarball untouched. . The bash type built-in reports the absence of result on stderr, the sh variant reports that on stdout. The report depends on the locale. On debian, Build-Depends-Indep contain mawk so there is no problem. Author: Ludovic Brenta Author: Nicolas Boulenguez --- a/docs/makefile +++ b/docs/makefile @@ -19,8 +19,6 @@ # # ############################################################################ -.SILENT: doc clean - MAKEINFO = $(shell which makeinfo 2> /dev/null) TEXI2DVI = $(shell which texi2dvi 2> /dev/null) PDFTEX = $(shell which pdftex 2> /dev/null) @@ -51,7 +49,7 @@ ../src/templates_parser-utils.ads.texi \ ../xsrc/templates_parser-xml.ads.texi -ALLDEPS = $(ADBFILES) $(ADSFILES) $(EXEFILES) $(TEXIFILES) $(TMPLTTEXI) \ +ALLDEPS = $(TEXIFILES) $(TMPLTTEXI) \ $(RESFILES) $(APIFILES) doc: $(ALLDEPS) $(DOCS) @@ -120,14 +118,16 @@ %.adb.html: %.adb `basename $@ .adb.html` >> $<.html +# Prefer an explicit sh as the shebang will only work if the file has +# execution permission. %.ads.texi: %.ads gentexifile - ./gentexifile $< NOGROUP + sh gentexifile $< NOGROUP %.adb.texi: %.adb %.adb.res gentexifile - ./gentexifile $< + sh gentexifile $< %.tmplt.texi: %.tmplt gentexifile - ./gentexifile $< + sh gentexifile $< force: --- a/makefile +++ b/makefile @@ -19,8 +19,6 @@ # # ############################################################################ -.SILENT: - VERSION = 11.6 GNAT = gnat --- a/docs/gentexifile +++ b/docs/gentexifile @@ -31,27 +31,24 @@ SOURCE=$1 TARGET=`basename ${SOURCE}`.texi TMPTAR=${TARGET}.tmp +GENOUT=genout2 -awk=`type gawk 2>/dev/null` -if [ x"$awk" = x ]; then - awk="awk" -else - awk="gawk" -fi +awk=awk -$awk 'BEGIN{out=1}$1=="end"&&substr($0,1,1)=="e"{out=1}out==1{print}$1=="private"&&$2!="with"&&out==1{out=0; print " -- implementation removed"}' ${SOURCE} > genout +$awk 'BEGIN{out=1}$1=="end"&&substr($0,1,1)=="e"{out=1}out==1{print}$1=="private"&&$2!="with"&&out==1{out=0; print " -- implementation removed"}' ${SOURCE} > ${GENOUT} rm -f ${TMPTAR} if [ $# = 1 ]; then echo "@TPEXP{" >>${TMPTAR} -sed -f ada.sed genout >>${TMPTAR} +sed -f ada.sed ${GENOUT} >>${TMPTAR} echo "}" >>${TMPTAR} else echo "@smallexample" >>${TMPTAR} -sed -f ada.sed genout >>${TMPTAR} +sed -f ada.sed ${GENOUT} >>${TMPTAR} echo "@end smallexample" >>${TMPTAR} fi cat ${TMPTAR} | tr -d '\r' > ${TARGET} rm ${TMPTAR} +rm ${GENOUT} debian/README.Debian0000644000000000000000000000046312207404375011236 0ustar libtemplates_parser for Debian ------------------------------ This package follows the convention for Ada library packages in Debian. Please find detailed information at http://people.debian.org/~lbrenta/debian-ada-policy.html -- Nicolas Boulenguez , Tue, 27 Aug 2013 05:28:59 +0200 debian/build_docs.gpr0000644000000000000000000000245212207404375012016 0ustar -- Templates Parser library examples build project file. -- Copyright (c) 2013 Nicolas Boulenguez -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. with "build"; project Build_Docs is for Source_Dirs use ("../docs"); for Main use External_As_List ("DOC_MAINS", " "); for Object_Dir use "../docs"; for Exec_Dir use "../docs"; package Compiler is for Default_Switches ("Ada") use External_As_list ("ADAFLAGS", " ") & ("-gnatwcfijkmruv", "-gnaty3abcefhiIklmnoprstx", "-Wall"); -- Inlining will be useful, but #642981 has to disappear first. end Compiler; package Binder is for Default_Switches ("Ada") use ("-E"); end Binder; package Linker is for Default_Switches ("Ada") use External_As_list ("LDFLAGS", " "); end Linker; end Build_Docs; debian/tests/0000755000000000000000000000000012207404375010334 5ustar debian/tests/control0000644000000000000000000000004412207404375011735 0ustar Tests: link-with-shared templatespp debian/tests/templatespp0000644000000000000000000000122012207404375012610 0ustar #!/bin/sh set -C -e -f -u cd "$ADTTMP" cat > mycss.tcss < expected < p.gpr < expected <Hello Ada EOF gnatmake -q -P p.gpr ./demo | diff expected - debian/ada_libraries0000644000000000000000000000007712207404375011702 0ustar KIND=dynamic SONAME=ignored_by_dh_ada_library debian/build.gpr debian/templates2ada.10000644000000000000000000000651712207404375012013 0ustar .TH TEMPLATES2ADA 1 "2008\-05\-04" "GNU Ada Tools" "Templates Parser User's Guide" .SH NAME templates2ada \- generate Ada sources from a templates file .SH SYNOPSIS \fBtemplates2ada\fR [options] .SH DESCRIPTION \fBtemplates2ada\fR parses all the template files in a directory and then generates an output file from these, based on a template file (a default example of which is provided as \fI/usr/share/doc/libtemplates\-parser\-dev/examples/templates.tads\fR). The latter contains in fact two examples, depending on whether one Ada package should be generated per template, or whether a single package should be built. In the former case, if you are using the GNAT compiler, you should run `gnatchop' on the resulting file. Here is an example: $ rm \-f src/templates/*.ads $ templates2ada \-d resources/ \-o src/templates/generated \-r $ cd src/templates; gnatchop \-w \-q generated $ rm \-f src/templates/generated One of the goals of \fBtemplates2ada\fR is to ensure that you are only setting tags that actually exist in the template (and thus prevent, as much as possibly, typos in the name of tags); also, when combined with other tools, to help ensure that all tags needed by the template are properly set. \fBtemplates2ada\fR also has special knowledge about HTTP constructs and will generate Ada constants for the HTTP parameters you might receive in return. Once more the goal is to help avoid typos in the Ada code. For instance, we will consider a simple template file, found in a local file `resources/block1.thtml'. This template contains the following simple html code:
When you run \fBtemplates2ada\fR, the following Ada package will be generated. Note that this is only the default output of \fBtemplates2ada\fR, which can be fully tailored to your needs. package Templates.Block1 is pragma Style_Checks (Off); Template : constant string := "resources/block1.thtml"; Tag1 : constant String := "TAG1"; Tag2 : constant String := "TAG2"; package Http is Param1 : constant String := "PARAM1"; Param2 : constant String := "PARAM2"; end Http; end Templates.Block1; .SH OPTIONS .IP "\fB\-d\fR \fIdir\fR" Search for template files in \fIdir\fR. .IP \fB\-h\fR Display a summary of options. .IP "\fB\-o\fR \fIfile\fR" Write the output to \fIfile\fR. .IP "\fB\-e\fR \fIext\fR" Process all files with extension \fIext\fR that are in the input directory; consider these files as template files. .IP \fB\-r\fR Recurse into subdirectories. .IP "\fB\-t\fR \fIfile\fR" Use \fIfile\fR as the output template file. The templates parser comes with an example for such a file, \fI/usr/share/doc/templates\-parser/examples/templates.tads\fR, that you can adapt to your own needs. .IP \fB\-v\fR Verbose mode. This will output a warning when an http parameter has a name made only of template parser tags, since no matching entry can then be created for it in the output file. .SH "SEE ALSO" .BR templatespp (1) The Template Parsers User's Guide in package libtemplates\-parser\-dev. .SH AUTHOR \fBtemplates2ada\fR was written by Pascal Obry as part of the Ada Web Server. This manual page was written by Ludovic Brenta for Debian GNU/Linux. debian/build.gpr0000644000000000000000000000362612207435761011015 0ustar -- Templates Parser library build project file. -- Copyright (c) 2013 Nicolas Boulenguez -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. with "xmlada"; library project Build is type Library_Kind is ("dynamic", "static"); Kind : Library_Kind := External ("KIND"); for Source_Dirs use ("../src", "../xsrc"); for Library_Name use "templates_parser"; for Library_Kind use Kind; case Kind is when "dynamic" => for Library_Version use External ("SONAME"); for Library_Options use External_As_List ("LDFLAGS", " "); when "static" => null; end case; for Library_Dir use "build_lib_" & Kind; for Object_Dir use "build_obj_" & Kind; package Compiler is for Default_Switches ("Ada") use External_As_list ("ADAFLAGS", " ") & ("-gnatwcfijkmruv", "-gnaty3abcefhiIklmnoprstx", "-Wall"); -- Inlining will be useful, but #642981 has to disappear first. end Compiler; package Naming is for Specification ("Templates_Parser.Configuration") use "templates_parser-configuration__standalone.ads"; for Implementation ("Templates_Parser.Input") use "templates_parser-input__standalone.adb"; for Implementation ("Templates_Parser_Tasking") use "templates_parser_tasking__standard_tasking.adb"; end Naming; package Binder is for Default_Switches ("Ada") use ("-E"); end Binder; end Build; debian/compat0000644000000000000000000000000212207404375010370 0ustar 9 debian/TODO0000644000000000000000000000010312207404375007654 0ustar Give Xavier the right to upload, as DM-Upload-Allowed is obsolete. debian/templatespp.10000644000000000000000000000277612207404375011626 0ustar .TH TEMPLATESPP1 1 "2008\-05\-04" "GNU Ada Tools" "Templates Parser User's Guide" .SH NAME templatespp \- preprocessor based on templates parser .SH SYNOPSIS \fBtemplatespp\fR [\-o \fIfile\fR] \fIfile\fR .SH DESCRIPTION \fBtemplatespp\fR is a pre\-processor based on the template parser. It is generally used from scripts to process files and generate other files. One of the possible uses, for instance, is to write the CSS (style\-sheet) of a web site as a template file (for instance `mycss.tcss'), and use template parser structures in there. This is a good way to share colors for instance, or to name constants, as is often done in Ada code. Here is a small example of such a CSS: @@SET@@ COLOR1=blue @@SET@@ COLOR2=red @@SET@@ LENGTH1=10 body {background:@_COLOR1_@} div {background:@_COLOR2_@} ul.class {background:@_COLOR1_@} /* same color as body */ ul {width:@_ADD(3):LENGTH1_@px} /* ul 3 pixels wider than li */ li {width:@_LENGTH1_@px} Such a file would be processed with the following command line: templatespp \-o mycss.css mycss.tcss .SH OPTIONS .IP \fB\-h\fR Display a summary of options. .IP "\fB\-o\fR \fIfile\fR" Write the output to \fIfile\fR. .SH "SEE ALSO" .BR templates2ada (1) The Template Parsers User's Guide in package libtemplates\-parser\-dev. .SH AUTHOR \fBtemplatespp\fR was written by Pascal Obry as part of the Ada Web Server. This manual page was written by Ludovic Brenta for Debian GNU/Linux. debian/watch0000644000000000000000000000031312207404375010220 0ustar # The latest templates-parser source distribution is available on # http://libre.adacore.com/libre/download. # The upstream tarball download system is too complicated to be # described in a watch file.