Package w3c-markup-validator: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | Name: w3c-markup-validator Version: 1.2 Release: alt1 Summary: W3C Markup Validator helps check the validity of Web documents Group: Networking/WWW License: W3C Software License Url: http://validator.w3.org/ Packager: Sergey Kurakin <kurakin@altlinux.org> Source0: http://validator.w3.org/sgml-lib.tar Source1: http://validator.w3.org/validator.tar Source2: http://www.w3.org/Icons/WWW/w3c_home_nb.png Source3: http://www.w3.org/QA/Tools/I_heart_validator.png Source4: http://www.opensource.org/trademarks/opensource/web/opensource-55x48.jpg Source5: %name.control Source6: http://www.w3.org/Icons/WWW/w3c_home.png Patch0: %name-1.2-alt-extsrc.patch Patch1: %name-0.8.5-alt-warning.patch BuildArch: noarch BuildPreReq: rpm-macros-apache rpm-macros-apache2 BuildPreReq: perl-XML-LibXML sgml-common perl-Net-IP Requires: %name-libs = %version-%release %name-config = %version-%release Requires(pre): %name-control = %version-%release Requires: perl(LWP/UserAgent.pm) >= 1.900 perl(Net/IP.pm) Obsoletes: w3c-validator # Automatically added by buildreq on Fri Sep 17 2010 (-bi) BuildRequires: apache2-common control perl-CGI perl-Config-General perl-Encode-HanExtra perl-HTML-Encoding perl-HTML-Template perl-JSON perl-SGML-Parser-OpenSP %description Most Web documents are written using markup languages, such as HTML or XHTML. These languages are defined by technical specifications, which usually include a machine-readable formal grammar (and vocabulary). The act of checking a document against these constraints is called validation, and this is what the Markup Validator does. This validator can process documents written in most markup languages. Local installation of W3C Markup Validator is accessible by URL: http://localhost/w3c-validator/ %package libs Summary: SGML and XML DTDs for the W3C Markup Validator Group: Networking/WWW Requires: sgml-common Obsoletes: w3c-validator-libs %description libs SGML and XML DTDs for the W3C Markup Validator. %package control Summary: Control facility for the W3C Markup Validator Group: Networking/WWW Requires: %name = %version-%release control %description control Control facility for the W3C Markup Validator to easily switch Allow_Private_IPs mode %package apache Summary: Apache 1.3 config for W3C Markup Validator Group: Networking/WWW Requires: %name = %version-%release Requires: apache Provides: %name-config = %version %description apache Configuration files and scripts, required for W3C Markup Validator to work with Apache 1.3. %package apache2 Summary: Apache 2 config for W3C Markup Validator Group: Networking/WWW Requires: %name = %version-%release Requires: apache2 Provides: %name-config = %version %description apache2 Configuration files and scripts, required for W3C Markup Validator to work with Apache 1.3. %set_perl_req_method relaxed %prep %setup -q -a 1 -n validator-%version mv htdocs/sgml-lib . rm -rf htdocs mv validator-%version/* . rm -rf validator-%version %patch0 -p2 %patch1 -p1 # localize configs. sed -i 's|/usr/local/validator\b|%_datadir/%name|' \ htdocs/config/validator.conf \ httpd/conf/httpd.conf \ httpd/cgi-bin/* sed -i -r 's|^(\s*Library\s*=\s*).*|\1%_datadir/sgml/%name|' htdocs/config/validator.conf sed -i 's|\bwww-validator\@w3\.org\b|root\@localhost|' htdocs/config/validator.conf sed -i 's|/validator\.w3\.org/|/localhost/w3c-validator/|' htdocs/config/validator.conf # prevent configuration error, if proxy module is not enabled sed -i 's|<Proxy|<IfModule proxy>\n<Proxy|;s|</Proxy>|</Proxy>\n</IfModule>|' httpd/conf/httpd.conf # make config for apache2 cp httpd/conf/httpd.conf httpd/conf/httpd2.conf # make validator's dir accessible for apache2 echo '<IfModule authz_host_module> <Directory /usr/share/w3c-markup-validator/> Order deny,allow Allow from all </Directory> </IfModule>' >> httpd/conf/httpd2.conf # start site echo 'w3c-markup-validator=yes' > httpd/conf/start_site.conf # mod_cgi is required echo 'cgi=yes' > httpd/conf/start_mods.conf # move config out of the way mv htdocs/config __config sed -i "s|Templates = .*\$|Templates = %_datadir/%name/templates|g" __config/validator.conf sed -i "s|#Base = |Base = |g" __config/validator.conf # unfortunately, we need this two dummy files to prevent errors # in case of new validator >=0.8.6 with old config <=0.8.5 # touch __config/eref.cfg __config/attref.cfg %build %install # config files for validator install -dm 755 %buildroot%_sysconfdir/w3c install -pm 644 __config/* %buildroot%_sysconfdir/w3c # config files for apache install -Dpm 644 httpd/conf/httpd.conf %buildroot%apache_modconfdir/%name.conf # config files for apache2 install -Dpm 644 httpd/conf/httpd2.conf %buildroot%apache2_extra_available/%name.conf install -Dpm 644 httpd/conf/start_site.conf %buildroot%apache2_extra_start/10-%name.conf install -Dpm 644 httpd/conf/start_mods.conf %buildroot%apache2_mods_start/10-%name.conf # Scripts, HTML, etc. install -dm 755 %buildroot%_datadir/%name cp -pR httpd/cgi-bin htdocs share/templates %buildroot%_datadir/%name # SGML library install -dm 755 %buildroot%_datadir/sgml cp -pR sgml-lib %buildroot%_datadir/sgml/%name install -dm 755 %buildroot%_sysconfdir/sgml touch %buildroot%_sysconfdir/sgml/%name-%version-%release.cat # local copies of external images install -pm 644 %SOURCE2 %buildroot%_datadir/%name/htdocs/images install -pm 644 %SOURCE6 %buildroot%_datadir/%name/htdocs/images install -pm 644 %SOURCE3 %buildroot%_datadir/%name/htdocs/images install -pm 644 %SOURCE4 %buildroot%_datadir/%name/htdocs/images # control facility install -Dpm 755 %SOURCE5 %buildroot%_sysconfdir/control.d/facilities/%name %pre %pre_control %name %post %post_control -s restricted %name %post apache [ $1 -eq 1 ] && %post_apacheconf || : %postun apache %postun_apacheconf || : %post apache2 %apache2_sbindir/a2chkconfig > /dev/null && %post_apache2conf || : %postun apache2 [ $1 -eq 0 ] && %apache2_sbindir/a2chkconfig > /dev/null && %postun_apache2conf || : %post libs for catalog in sgml.soc xml.soc ; do install-catalog --add \ %_sysconfdir/sgml/%name-%version-%release.cat \ %_datadir/sgml/%name/$catalog >/dev/null 2>&1 || : done %preun libs for catalog in sgml.soc xml.soc ; do install-catalog --remove \ %_sysconfdir/sgml/%name-%version-%release.cat \ %_datadir/sgml/%name/$catalog >/dev/null 2>&1 || : done %files %config %_sysconfdir/w3c/ %_datadir/%name/ %files control %_sysconfdir/control.d/facilities/%name %files apache %config %apache_modconfdir/%name.conf %files apache2 %config %apache2_extra_available/* %config %apache2_extra_start/* %config %apache2_mods_start/* %files libs %ghost %config %_sysconfdir/sgml/%name-%version-%release.cat %_datadir/sgml/%name/ %changelog * Sat Sep 10 2011 Sergey Kurakin <kurakin@altlinux.org> 1.2-alt1 - 1.2 * Fri Sep 17 2010 Sergey Kurakin <kurakin@altlinux.org> 1.1-alt1 - 1.1 - more reliable config for apache2 - control facility to easily switch and remember Allow_Private_IPs mode * Wed Jul 22 2009 Sergey Kurakin <kurakin@altlinux.org> 0.8.5-alt3 - unowned directory fixed * Tue Jul 21 2009 Sergey Kurakin <kurakin@altlinux.org> 0.8.5-alt2 - added Requires: String/Approx.pm - "This instance of the validator..." warning corrected - fixed external sources in UI: + used local copies of images: w3c logo, Open Source logo etc. + removed w3c ads block * Tue May 5 2009 Sergey Kurakin <kurakin@altlinux.org> 0.8.5-alt1 - 0.8.5: + new feature to suggest possible (valid) alternatives + some bug fixes, UI improvements, documentation updates * Sat Jan 31 2009 Sergey Kurakin <kurakin@altlinux.org> 0.8.4-alt1 - 0.8.4, mostly bugfix release - previously removed "user-agent" feature moved back (fixed in upstream) * Mon Sep 8 2008 Sergey Kurakin <kurakin@altlinux.ru> 0.8.3-alt2 - deactivated experimental "user-agent" feature - spec cleanup (including post and postun scripts) with new macros from rpm-macros-apache and rpm-macros-apache2 - added BuildRequires; thus fixed most of Requires too - added Requires, that can not be calculated by perlreq due to "set_perl_req_method relaxed" * Thu Sep 04 2008 Gleb Stiblo <ulfr@altlinux.ru> 0.8.3-alt1 - new version - include #15488 fix * Fri Apr 25 2008 Sergey Kurakin <kurakin@altlinux.ru> 0.8.2-alt1 - new version - added support for apache2 - configuration files for apache and apache2 moved to different subpackages - set_perl_req_method relaxed - restored self-diagnostics in "check" script (paths to config files etc.) * Wed Oct 04 2006 Gleb Stiblo <ulfR@altlinux.ru> 0.7.2-alt1 - new version - package rename * Fri Jun 11 2004 Gleb Stiblo <ulfr@altlinux.ru> 0.6.1-alt5 - OpenSP added in requires * Wed May 12 2004 Gleb Stiblo <ulfr@altlinux.ru> 0.6.1-alt4 - spec cleanup - checking for include line in httpd.conf added * Mon May 03 2004 Gleb Stiblo <ulfr@altlinux.ru> 0.6.1-alt3 - glibc 2.3 build * Tue Apr 27 2004 Gleb Stiblo <ulfr@altlinux.ru> 0.6.1-alt2 - post/postun scripts changed * Tue Mar 23 2004 Gleb Stiblo <ulfr@altlinux.ru> 0.6.1-alt1 - ALT adaptation. - -T removed from check * Sun Dec 1 2002 Ville Skyttä <ville.skytta at iki.fi> - 0.6.1-1w3c - Update to 0.6.1. * Fri Nov 29 2002 Ville Skyttä <ville.skytta at iki.fi> - 0.6.0-1w3c - First release. |