| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- ##
- ## wdg-validator.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package versions
- %define V_validator 1.2.2
- %define V_lq_sp 1.3.4.13
- %define V_wdg_sgml_lib 1.1.4
- # package information
- Name: wdg-validator
- Summary: Web Design Group HTMLHelp.com Offline Validator
- URL: http://www.htmlhelp.com/tools/validator/offline/
- Vendor: Liam Quinn
- Packager: OpenPKG
- Distribution: OpenPKG
- Class: EVAL
- Group: HTML
- License: Artistic
- Version: %{V_validator}
- Release: 20061011
- # list of sources
- Source0: http://www.htmlhelp.com/tools/validator/offline/validate-%{V_validator}
- Source1: http://www.htmlhelp.com/tools/validator/src/lq-sp-%{V_lq_sp}.tar.gz
- Source2: http://www.htmlhelp.com/tools/validator/src/wdg-sgml-lib-%{V_wdg_sgml_lib}.tar.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20041222, make, gcc, gcc::with_cxx = yes, m4, perl
- PreReq: OpenPKG, openpkg >= 20041222, perl, perl-www
- AutoReq: no
- AutoReqProv: no
- %description
- The Web Design Group HTMLHelp.com Offline Validator checks the
- syntax of HTML and XHTML documents.
- %track
- prog wdg-validator = {
- version = %{V_validator}
- url = http://www.htmlhelp.com/tools/validator/offline/
- regex = ">validate</a></strong> \(Version (__VER__)\)</dt>"
- }
- prog wdg-validator:lq-sp = {
- version = %{V_lq_sp}
- url = http://www.htmlhelp.com/tools/validator/src/
- regex = lq-sp-(__VER__)\.tar\.gz
- }
- prog wdg-validator:wdg-sgml-lib = {
- version = %{V_wdg_sgml_lib}
- url = http://www.htmlhelp.com/tools/validator/src/
- regex = wdg-sgml-lib-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -T -D -c
- %setup -q -T -D -a 1
- ( cd lq-sp-%{V_lq_sp}
- xlibs=""
- case "%{l_platform -t}" in
- *-sunos* ) xlibs="-lnsl -lsocket" ;;
- esac
- %{l_shtool} subst \
- -e 's;^\(prefix=\).*$;\1%{l_prefix}/libexec/wdg-validator;' \
- -e 's;^\(CC=\).*$;\1%{l_cc};' \
- -e 's;^\(CFLAGS=\).*$;\1%{l_cflags -O};' \
- -e 's;^\(CXX=\).*$;\1%{l_cxx};' \
- -e 's;^\(CXXFLAGS=\).*$;\1%{l_cxxflags -O} -ansi;' \
- -e 's;^\(LDFLAGS=\).*$;\1%{l_ldflags};' \
- -e "s;^\(XLIBS=\).*$;\1$xlibs;" \
- -e 's;^\(M4=\).*$;\1%{l_prefix}/bin/m4;' \
- -e 's;^\(PERL=\).*$;\1%{l_prefix}/bin/perl;' \
- -e 's;^\(INSTALL=\).*$;\1%{l_shtool} install;' \
- Makefile
- ) || exit $?
- %build
- ( cd lq-sp-%{V_lq_sp}
- %{l_make} clean
- sleep 1; touch Makefile; sleep 1
- %{l_make} %{l_mflags -O}
- ) || exit $?
- %install
- rm -rf $RPM_BUILD_ROOT
- # install WDG validator
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin
- %{l_shtool} install -c -m 755 \
- -e 's;^\(#!\)/.*$;\1%{l_prefix}/bin/perl -T;' \
- -e 's;\(Usage: \)\(validate\);\1wdg-\2;g' \
- -e 's;^\(my $nsgmlsLocation =\).*$;\1 "%{l_prefix}/libexec/wdg-validator/bin/lq-nsgmls"\;;' \
- -e 's;^\(my $sgmlDir =\).*$;\1 "%{l_prefix}/share/wdg-validator/sgml-lib"\;;' \
- %{SOURCE validate-%{V_validator}} \
- $RPM_BUILD_ROOT%{l_prefix}/bin/wdg-validate
- # install variant of James Clark's SP modified by Liam Quinn
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/wdg-validator
- ( cd lq-sp-%{V_lq_sp}
- %{l_make} %{l_mflags} install \
- prefix="$RPM_BUILD_ROOT%{l_prefix}/libexec/wdg-validator"
- ) || exit $?
- # install SGML lib
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/share/wdg-validator/sgml-lib
- ( umask 022
- %{l_tar} xzf %{SOURCE wdg-sgml-lib-%{V_wdg_sgml_lib}.tar.gz} \
- -C $RPM_BUILD_ROOT%{l_prefix}/share/wdg-validator/sgml-lib/ \
- --strip-components 2
- ) || exit $?
- strip $RPM_BUILD_ROOT%{l_prefix}/libexec/wdg-validator/bin/* \
- >/dev/null 2>&1 || true
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|