Группа :: Работа с текстами
Пакет: asciidoc
Главная Изменения Спек Патчи Загрузить Bugs and FR
%def_with M24
%if_with M24
%define _release alt1.M24.1
%else
%define _release alt2
%endif
Name: asciidoc
Version: 7.1.2
Release: %_release
Summary: asciidoc converts an AsciiDoc text file to DocBook, HTML or LinuxDoc
Group: Text tools
License: GPL
Url: http://www.methods.co.nz/asciidoc/
BuildArch: noarch
Packager: Andrei Bulava <abulava at altlinux.ru>
Source0: http://www.methods.co.nz/asciidoc/%name-%version.tar.gz
Patch0: %name-7.1.2-build-website.sh.patch
Requires: python = %__python_version
BuildPreReq: python-devel = %__python_version
%description
The asciidoc(1) command translates the AsciiDoc text file to the backend
formatted file.
AsciiDoc is a text document format for writing short documents, articles,
books and UNIX man pages.
%package a2x
Summary: a2x converts AsciiDoc text file to PDF, XHTML, HTML Help, manpage or plain text
Group: Text tools
Requires: %name = %version-%release
Requires: lynx xsltproc docbook-style-xsl
%description a2x
A DocBook toolchain wrapper script that translates an AsciiDoc text
file to PDF, XHTML (single page or chunked), man page, HTML Help
or plain text formats. PDF, XHTML, man page and HTML Help formats are
generated using the asciidoc(1)/xsltproc(1)/DocBook XSL Stylesheets
toolchain. Plain text is produced by passing asciidoc(1) generated HTML
through lynx(1). The htmlhelp format option generates .hhp, .hhc and
.html files suitable for compilation to an HTML Help .chm file.
%package doc
Summary: AsciiDoc documentation and examples
%if_with M24
Group: Text tools
%else
Group: Development/Documentation
%endif
Requires: %name = %version-%release
%description doc
The asciidoc(1) command translates the AsciiDoc text file to the backend
formatted file.
AsciiDoc is a text document format for writing short documents, articles,
books and UNIX man pages.
This package contains AsciiDoc documentation and examples.
%define docdir %_docdir/%name-%version
%prep
%setup -q
%patch0 -p1
%__mv -f COPYING COPYING.orig
%__ln_s $(relative %_licensedir/GPL-2 %_docdir/%name/COPYING) COPYING
%build
%install
%__mkdir -p %buildroot%_sysconfdir/%name{,/filters,/docbook-xsl,/stylesheets,/javascripts}
%__mkdir -p %buildroot{%_bindir,%_datadir/%name}
### Installation procedure following AsciiDoc User Guide's Packager Notes
# step 1
%__install -m 755 %name.py %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/%name.py %_bindir/%name) %buildroot%_bindir/%name
# step 2
%__install -m 755 a2x %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/a2x %_bindir/a2x) %buildroot%_bindir/a2x
# step 3
%__install -m 644 *.conf %buildroot%_sysconfdir/%name
# step 4
%__install -m 644 filters/code-filter.conf %buildroot%_sysconfdir/%name/filters
%__install -m 755 filters/code-filter.py %buildroot%_sysconfdir/%name/filters
# step 5
%__install -m 644 docbook-xsl/*.xsl %buildroot%_sysconfdir/%name/docbook-xsl
# step 6
%__install -m 644 stylesheets/*.css %buildroot%_sysconfdir/%name/stylesheets
# step 7
%__install -m 644 javascripts/*.js %buildroot%_sysconfdir/%name/javascripts
# step 8
%__cp -pR images %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/images %_sysconfdir/%name/images) %buildroot%_sysconfdir/%name/images
# step 9
%__mkdir -p %buildroot%_man1dir
%__install -m 644 doc/%name.1 %buildroot%_man1dir
%__install -m 644 doc/a2x.1 %buildroot%_man1dir
%__mkdir -p %buildroot%docdir
%__cp -p BUGS{,.txt} CHANGELOG{,.txt} COPYRIGHT README{,.txt} %buildroot%docdir
%__cp --no-dereference COPYING %buildroot%docdir
%__mkdir -p %buildroot%docdir/doc
%__cp -p doc/{customers.csv,asciidoc.1.txt,asciidoc.txt,a2x.1.txt} %buildroot%docdir/doc
%__cp -pR examples %buildroot%docdir
%__mkdir -p %buildroot%docdir/filters
%__cp -p filters/*.txt %buildroot%docdir/filters
%__ln_s $(relative %_datadir/%name/images %docdir/images) %buildroot%docdir/images
%__ln_s $(relative %_sysconfdir/%name/stylesheets %docdir/stylesheets) %buildroot%docdir/stylesheets
%__ln_s $(relative %_sysconfdir/%name/javascripts %docdir/javascripts) %buildroot%docdir/javascripts
%files
%dir %docdir
%docdir/BUGS
%docdir/CHANGELOG
%docdir/COPYING
%docdir/COPYRIGHT
%docdir/README
%_man1dir/%name.1.*
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*.conf
%dir %_sysconfdir/%name/filters
%config(noreplace) %_sysconfdir/%name/filters/code-filter.*
%dir %_sysconfdir/%name/stylesheets
%config(noreplace) %_sysconfdir/%name/stylesheets/*.css
%dir %_sysconfdir/%name/javascripts
%config(noreplace) %_sysconfdir/%name/javascripts/*.js
%_sysconfdir/%name/images
%_bindir/%name
%dir %_datadir/%name
%_datadir/%name/%name.py
%_datadir/%name/images
%files a2x
%_man1dir/a2x.1.*
%dir %_sysconfdir/%name/docbook-xsl
%config(noreplace) %_sysconfdir/%name/docbook-xsl/*.xsl
%_bindir/a2x
%_datadir/%name/a2x
%files doc
%docdir/BUGS.txt
%docdir/CHANGELOG.txt
%docdir/README.txt
%docdir/doc
%docdir/images
%docdir/stylesheets
%docdir/javascripts
%docdir/examples
%docdir/filters
%changelog
…
Полный changelog можно просмотреть здесь
%if_with M24
%define _release alt1.M24.1
%else
%define _release alt2
%endif
Name: asciidoc
Version: 7.1.2
Release: %_release
Summary: asciidoc converts an AsciiDoc text file to DocBook, HTML or LinuxDoc
Group: Text tools
License: GPL
Url: http://www.methods.co.nz/asciidoc/
BuildArch: noarch
Packager: Andrei Bulava <abulava at altlinux.ru>
Source0: http://www.methods.co.nz/asciidoc/%name-%version.tar.gz
Patch0: %name-7.1.2-build-website.sh.patch
Requires: python = %__python_version
BuildPreReq: python-devel = %__python_version
%description
The asciidoc(1) command translates the AsciiDoc text file to the backend
formatted file.
AsciiDoc is a text document format for writing short documents, articles,
books and UNIX man pages.
%package a2x
Summary: a2x converts AsciiDoc text file to PDF, XHTML, HTML Help, manpage or plain text
Group: Text tools
Requires: %name = %version-%release
Requires: lynx xsltproc docbook-style-xsl
%description a2x
A DocBook toolchain wrapper script that translates an AsciiDoc text
file to PDF, XHTML (single page or chunked), man page, HTML Help
or plain text formats. PDF, XHTML, man page and HTML Help formats are
generated using the asciidoc(1)/xsltproc(1)/DocBook XSL Stylesheets
toolchain. Plain text is produced by passing asciidoc(1) generated HTML
through lynx(1). The htmlhelp format option generates .hhp, .hhc and
.html files suitable for compilation to an HTML Help .chm file.
%package doc
Summary: AsciiDoc documentation and examples
%if_with M24
Group: Text tools
%else
Group: Development/Documentation
%endif
Requires: %name = %version-%release
%description doc
The asciidoc(1) command translates the AsciiDoc text file to the backend
formatted file.
AsciiDoc is a text document format for writing short documents, articles,
books and UNIX man pages.
This package contains AsciiDoc documentation and examples.
%define docdir %_docdir/%name-%version
%prep
%setup -q
%patch0 -p1
%__mv -f COPYING COPYING.orig
%__ln_s $(relative %_licensedir/GPL-2 %_docdir/%name/COPYING) COPYING
%build
%install
%__mkdir -p %buildroot%_sysconfdir/%name{,/filters,/docbook-xsl,/stylesheets,/javascripts}
%__mkdir -p %buildroot{%_bindir,%_datadir/%name}
### Installation procedure following AsciiDoc User Guide's Packager Notes
# step 1
%__install -m 755 %name.py %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/%name.py %_bindir/%name) %buildroot%_bindir/%name
# step 2
%__install -m 755 a2x %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/a2x %_bindir/a2x) %buildroot%_bindir/a2x
# step 3
%__install -m 644 *.conf %buildroot%_sysconfdir/%name
# step 4
%__install -m 644 filters/code-filter.conf %buildroot%_sysconfdir/%name/filters
%__install -m 755 filters/code-filter.py %buildroot%_sysconfdir/%name/filters
# step 5
%__install -m 644 docbook-xsl/*.xsl %buildroot%_sysconfdir/%name/docbook-xsl
# step 6
%__install -m 644 stylesheets/*.css %buildroot%_sysconfdir/%name/stylesheets
# step 7
%__install -m 644 javascripts/*.js %buildroot%_sysconfdir/%name/javascripts
# step 8
%__cp -pR images %buildroot%_datadir/%name
%__ln_s $(relative %_datadir/%name/images %_sysconfdir/%name/images) %buildroot%_sysconfdir/%name/images
# step 9
%__mkdir -p %buildroot%_man1dir
%__install -m 644 doc/%name.1 %buildroot%_man1dir
%__install -m 644 doc/a2x.1 %buildroot%_man1dir
%__mkdir -p %buildroot%docdir
%__cp -p BUGS{,.txt} CHANGELOG{,.txt} COPYRIGHT README{,.txt} %buildroot%docdir
%__cp --no-dereference COPYING %buildroot%docdir
%__mkdir -p %buildroot%docdir/doc
%__cp -p doc/{customers.csv,asciidoc.1.txt,asciidoc.txt,a2x.1.txt} %buildroot%docdir/doc
%__cp -pR examples %buildroot%docdir
%__mkdir -p %buildroot%docdir/filters
%__cp -p filters/*.txt %buildroot%docdir/filters
%__ln_s $(relative %_datadir/%name/images %docdir/images) %buildroot%docdir/images
%__ln_s $(relative %_sysconfdir/%name/stylesheets %docdir/stylesheets) %buildroot%docdir/stylesheets
%__ln_s $(relative %_sysconfdir/%name/javascripts %docdir/javascripts) %buildroot%docdir/javascripts
%files
%dir %docdir
%docdir/BUGS
%docdir/CHANGELOG
%docdir/COPYING
%docdir/COPYRIGHT
%docdir/README
%_man1dir/%name.1.*
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*.conf
%dir %_sysconfdir/%name/filters
%config(noreplace) %_sysconfdir/%name/filters/code-filter.*
%dir %_sysconfdir/%name/stylesheets
%config(noreplace) %_sysconfdir/%name/stylesheets/*.css
%dir %_sysconfdir/%name/javascripts
%config(noreplace) %_sysconfdir/%name/javascripts/*.js
%_sysconfdir/%name/images
%_bindir/%name
%dir %_datadir/%name
%_datadir/%name/%name.py
%_datadir/%name/images
%files a2x
%_man1dir/a2x.1.*
%dir %_sysconfdir/%name/docbook-xsl
%config(noreplace) %_sysconfdir/%name/docbook-xsl/*.xsl
%_bindir/a2x
%_datadir/%name/a2x
%files doc
%docdir/BUGS.txt
%docdir/CHANGELOG.txt
%docdir/README.txt
%docdir/doc
%docdir/images
%docdir/stylesheets
%docdir/javascripts
%docdir/examples
%docdir/filters
%changelog
…
Полный changelog можно просмотреть здесь