Changeset 972 for branches


Ignore:
Timestamp:
07/04/14 09:01:18 (10 years ago)
Author:
olahaye
Message:

[jobmonarch.spec] Fix package that fails to build on rhel7 and fc-18+
--with switch doesn't support value assigment anymore, we need to use --define.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/pkg/rpm/jobmonarch.spec

    r957 r972  
    11
    22# The following options are supported:
    3 #   --with httpd_user=<username>       # defaults to: apache
    4 #   --with httpd_group=<group>         # defaults to: apache
    5 #   --with ganglia_user=<username>     # defaults to: ganglia
    6 #   --with ganglia_group=<group>       # defaults to: ganglia
    7 #   --with web_prefixdir=<path>        # defaults to: /usr/share/ganglia-webfrontend
    8 
    9 # example: rpmbuild -tb jobmonarch-1.1.2.tar.gz --with httpd_user=www-data --with httpd_group=www-data --with web_prefixdir=/srv/www/ganglia
    10 
    11 # Default value for web_prefixdir depending on distro.
     3#   --define 'httpd_user <username>'       # defaults to: apache
     4#   --define 'httpd_group <group>'         # defaults to: apache
     5#   --define 'ganglia_user <username>'     # defaults to: ganglia
     6#   --define 'ganglia_group <group>'       # defaults to: ganglia
     7#   --define 'web_prefixdir <path>'        # defaults to: /usr/share/ganglia-webfrontend
     8
     9# example: rpmbuild -tb jobmonarch-1.1.2.tar.gz --define 'httpd_user www-data' --define 'httpd_group www-data' --define 'web_prefixdir /srv/www/ganglia'
     10
     11# Default values for Above variables.
    1212%if 0%{?suse_version}
    13 %define web_prefixdir /srv/www/htdocs/ganglia
    14 %else
    15 %define web_prefixdir /usr/share/ganglia-webfrontend
    16 %endif
    17 
    18 # Default value for httpd user and group used by ganglia.
    19 %define httpd_user apache
    20 %define httpd_group apache
    21 %define ganglia_user ganglia
    22 %define ganglia_group ganglia
    23 
    24 # Read the provided --with tags if any (overriding default values).
    25 %{?_with_httpd_user:%define httpd_user %(set -- %{_with_httpd_user}; echo $2 | cut -d= -f2)}
    26 %{?_with_httpd_group:%define httpd_group %(set -- %{_with_httpd_group}; echo $2 | cut -d= -f2)}
    27 %{?_with_httpd_user:%define ganglia_user %(set -- %{_with_ganglia_user}; echo $2 | cut -d= -f2)}
    28 %{?_with_httpd_group:%define ganglia_group %(set -- %{_with_ganglia_group}; echo $2 | cut -d= -f2)}
    29 %{?_with_web_prefixdir:%define web_prefixdir %(set -- %{_with_web_prefixdir}; echo $2 | cut -d= -f2)}
     13%{!?web_prefixdir: %define web_prefixdir /srv/www/htdocs/ganglia}
     14%else
     15%{!?web_prefixdir: %define web_prefixdir /usr/share/ganglia-webfrontend}
     16%endif
     17
     18%{!?httpd_user: %define httpd_user apache}
     19%{!?httpd_group: %define httpd_group apache}
     20%{!?ganglia_user: %define ganglia_user ganglia}
     21%{!?ganglia_group: %define ganglia_group ganglia}
    3022
    3123# Don't need debuginfo RPM
     
    472464
    473465%changelog
    474 * Wed Mar 05 2014 Olivier Lahaye <olivier.lahaye@free.fr> 1.2.0-1
     466* Fri Jul 04 2014 Olivier Lahaye <olivier.lahaye@free.fr> 1.1.3-2
     467- Replace --with that doesn't support value assigment in latest
     468  rpmbuild version with --define
     469
     470* Wed Mar 05 2014 Olivier Lahaye <olivier.lahaye@free.fr> 1.1.3-1
    475471- Update default ganglia root.
    476472- Add native systemd support.
Note: See TracChangeset for help on using the changeset viewer.