Browse Source

cleanup package by using new %option stuff

master
parent
commit
9f50668c4e
  1. 148
      apache/apache.spec

148
apache/apache.spec

@ -37,79 +37,83 @@
## IS THAT RPM'S MACRO MECHANISM HORSES UP HORRIBLY ELSE!
# the additionally used Apache modules (can be enabled without thinking)
%{!?with_mod_ssl: %define with_mod_ssl no}
%{!?with_mod_perl: %define with_mod_perl no}
%{!?with_mod_php: %define with_mod_php no}
%{!?with_mod_php3: %define with_mod_php3 no}
%{!?with_mod_dav: %define with_mod_dav no}
%{!?with_mod_layout: %define with_mod_layout no}
%{!?with_mod_macro: %define with_mod_macro no}
%option with_mod_ssl no
%option with_mod_perl no
%option with_mod_php no
%option with_mod_php3 no
%option with_mod_dav no
%option with_mod_layout no
%option with_mod_macro no
# the additionally used Apache modules (you have to know what you do)
%{!?with_mod_auth_pam: %define with_mod_auth_pam no}
%{!?with_mod_gzip: %define with_mod_gzip no}
%{!?with_mod_fastcgi: %define with_mod_fastcgi no}
%{!?with_mod_throttle: %define with_mod_throttle no}
%{!?with_mod_access_referer: %define with_mod_access_referer no}
%{!?with_mod_roaming: %define with_mod_roaming no}
%{!?with_mod_relocate: %define with_mod_relocate no}
%option with_mod_auth_pam no
%option with_mod_gzip no
%option with_mod_fastcgi no
%option with_mod_throttle no
%option with_mod_access_referer no
%option with_mod_roaming no
%option with_mod_relocate no
# more optional PHP4 specific settings
# (requires "with_mod_php" set to "yes" above!)
%{!?with_mod_php_calendar: %define with_mod_php_calendar no}
%{!?with_mod_php_mysql: %define with_mod_php_mysql no}
%{!?with_mod_php_gd: %define with_mod_php_gd no}
%{!?with_mod_php_db: %define with_mod_php_db no}
%{!?with_mod_php_debug: %define with_mod_php_debug no}
%{!?with_mod_php_pdflib: %define with_mod_php_pdflib no}
%{!?with_mod_php_zlib: %define with_mod_php_zlib no}
%{!?with_mod_php_bzip2: %define with_mod_php_bzip2 no}
%{!?with_mod_php_openssl: %define with_mod_php_openssl no}
%{!?with_mod_php_openldap: %define with_mod_php_openldap no}
%{!?with_mod_php_mm: %define with_mod_php_mm no}
%{!?with_mod_php_pcre: %define with_mod_php_pcre no}
%{!?with_mod_php_ftp: %define with_mod_php_ftp no}
%{!?with_mod_php_java: %define with_mod_php_java no}
%{!?with_mod_php_oci8: %define with_mod_php_oci8 no}
%{!?with_mod_php_freetype: %define with_mod_php_freetype no}
%{!?with_mod_php_gettext: %define with_mod_php_gettext no}
%{!?with_mod_php_imap: %define with_mod_php_imap no}
%{!?with_mod_php_xml: %define with_mod_php_xml no}
%{!?with_mod_php_bc: %define with_mod_php_bc no}
%{!?with_mod_php_transsid: %define with_mod_php_transsid no}
%option with_mod_php_calendar no
%option with_mod_php_mysql no
%option with_mod_php_gd no
%option with_mod_php_db no
%option with_mod_php_debug no
%option with_mod_php_pdflib no
%option with_mod_php_zlib no
%option with_mod_php_bzip2 no
%option with_mod_php_openssl no
%option with_mod_php_openldap no
%option with_mod_php_mm no
%option with_mod_php_pcre no
%option with_mod_php_ftp no
%option with_mod_php_java no
%option with_mod_php_oci8 no
%option with_mod_php_freetype no
%option with_mod_php_gettext no
%option with_mod_php_imap no
%option with_mod_php_xml no
%option with_mod_php_bc no
%option with_mod_php_transsid no
# more optional PHP3 specific settings
# (requires "with_mod_php3" set to "yes" above!)
%{!?with_mod_php3_ftp: %define with_mod_php3_ftp no}
%{!?with_mod_php3_gd: %define with_mod_php3_gd no}
%{!?with_mod_php3_jpeg: %define with_mod_php3_jpeg no}
%{!?with_mod_php3_mysql: %define with_mod_php3_mysql no}
%{!?with_mod_php3_openssl: %define with_mod_php3_openssl no}
%{!?with_mod_php3_zlib: %define with_mod_php3_zlib no}
%option with_mod_php3_ftp no
%option with_mod_php3_gd no
%option with_mod_php3_jpeg no
%option with_mod_php3_mysql no
%option with_mod_php3_openssl no
%option with_mod_php3_zlib no
# fixing implicit inter-module dependencies and correlations
%if "%{with_mod_php}" == "yes"
%if "%{with_mod_php3}" == "yes"
%{error: with_mod_php conflicts with with_mod_php3}
# FIXME: error macro does not terminate execution
exit 1
ERROR: with_mod_php conflicts with with_mod_php3
%endif
%if "%{with_mod_ssl}" == "yes"
%undefine with_mod_php_openssl
%undefine with_mod_php_mm
%define with_mod_php_openssl yes
%define with_mod_php_mm yes
%endif
%if "%{with_mod_php_freetype}" == "yes"
%undefine with_mod_php_gd
%define with_mod_php_gd yes
%endif
%if "%{with_mod_php_mysql}" == "yes" || "%{with_mod_php_pdflib}" == "yes" || "%{with_mod_php_gd}" == "yes"
%undefine with_mod_php_zlib
%define with_mod_php_zlib yes
%endif
%endif
%if "%{with_mod_php3}" == "yes"
%if "%{with_mod_ssl}" == "yes"
%undefine with_mod_php3_openssl
%define with_mod_php3_openssl yes
%endif
%if "%{with_mod_php3_mysql}" == "yes"
%undefine with_mod_php3_zlib
%define with_mod_php3_zlib yes
%endif
%endif
@ -141,7 +145,7 @@ Distribution: OpenPKG [BASE]
Group: Web
License: ASF
Version: %{V_apache}
Release: 20021228
Release: 20021230
# list of sources
Source0: http://www.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
@ -167,8 +171,8 @@ Source23: rc.apache
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020222
PreReq: OpenPKG, openpkg >= 20020222
BuildPreReq: OpenPKG, openpkg >= 20021230
PreReq: OpenPKG, openpkg >= 20021230
%if "%{with_mod_ssl}" == "yes"
BuildPreReq: openssl, mm
%endif
@ -262,58 +266,12 @@ AutoReqProv: no
of users have contributed ideas, code, and documentation to the
project.
Options (additional modules I):
--define 'with_mod_dav %{with_mod_dav}'
--define 'with_mod_layout %{with_mod_layout}'
--define 'with_mod_macro %{with_mod_macro}'
--define 'with_mod_perl %{with_mod_perl}'
--define 'with_mod_php %{with_mod_php}'
--define 'with_mod_php3 %{with_mod_php3}'
--define 'with_mod_ssl %{with_mod_ssl}'
Options (additional modules II):
--define 'with_mod_access_referer %{with_mod_access_referer}'
--define 'with_mod_auth_pam %{with_mod_auth_pam}'
--define 'with_mod_fastcgi %{with_mod_fastcgi}'
--define 'with_mod_gzip %{with_mod_gzip}'
--define 'with_mod_relocate %{with_mod_relocate}'
--define 'with_mod_roaming %{with_mod_roaming}'
--define 'with_mod_throttle %{with_mod_throttle}'
Options (additional extensions for mod_php):
--define 'with_mod_php_bzip2 %{with_mod_php_bzip2}'
--define 'with_mod_php_bc %{with_mod_php_bc}'
--define 'with_mod_php_calendar %{with_mod_php_calendar}'
--define 'with_mod_php_db %{with_mod_php_db}'
--define 'with_mod_php_debug %{with_mod_php_debug}'
--define 'with_mod_php_ftp %{with_mod_php_ftp}'
--define 'with_mod_php_freetype %{with_mod_php_freetype}'
--define 'with_mod_php_gd %{with_mod_php_gd}'
--define 'with_mod_php_gettext %{with_mod_php_gettext}'
--define 'with_mod_php_imap %{with_mod_php_imap}'
--define 'with_mod_php_java %{with_mod_php_java}'
--define 'with_mod_php_mm %{with_mod_php_mm}'
--define 'with_mod_php_mysql %{with_mod_php_mysql}'
--define 'with_mod_php_oci8 %{with_mod_php_oci8}'
--define 'with_mod_php_openldap %{with_mod_php_openldap}'
--define 'with_mod_php_openssl %{with_mod_php_openssl}'
--define 'with_mod_php_pcre %{with_mod_php_pcre}'
--define 'with_mod_php_pdflib %{with_mod_php_pdflib}'
--define 'with_mod_php_transsid %{with_mod_php_transsid}'
--define 'with_mod_php_xml %{with_mod_php_xml}'
--define 'with_mod_php_zlib %{with_mod_php_zlib}'
Options (additional extensions for mod_php3):
--define 'with_mod_php3_ftp %{with_mod_php3_ftp}'
--define 'with_mod_php3_gd %{with_mod_php3_gd}'
--define 'with_mod_php3_jpeg %{with_mod_php3_jpeg}'
--define 'with_mod_php3_mysql %{with_mod_php3_mysql}'
--define 'with_mod_php3_openssl %{with_mod_php3_openssl}'
--define 'with_mod_php3_zlib %{with_mod_php3_zlib}'
%options -p25
%prep
# unpack Apache distribution
%setup0 -q -c
# unpack optional extension modules
%if "%{with_mod_ssl}" == "yes"
%setup1 -q -T -D -a 1

Loading…
Cancel
Save