Closed olahaye74 closed 10 years ago
[build & packaging] Reworked the install and packaging so it results in the same installation whatever the build is (manual, deb pkg or rpm pkg)
Tested on ubuntu 12.04: Works perfectly. Tested on centos-6.5: Works perfectly. Tested on fedora-17: Works perfectly.
Small fix that prevent to fall in a situation similar to https://bugs.launchpad.net/rpm/+bug/930471 Thus using --with web_prefixdir=/usr/share/ganglia-webfrontend --with httpd_user=www-data would end up having the following lua variables: %web_prefixdir = /usr/share/ganglia_webfrontend %httpd_user = www_data
Hopefully, this time, there is no more mistakes :)
--with doesn't accept value assignation and was apparently an unsupported option in previous rpm versions. Fixed by replacing --with var=value with --define 'var value' Aslo made Makefile more smart and more vebose. Splitted install: rule in 2 rules: one that installs the files and one that does the chown. Thus package can be built with non-root account.
No need to %__cp %{SOURCE1}. File already there. Note: using more than one source prevent a build from tarball using rpmbuild -tb ganglia-web-3.5.12.tar.gz for instance.