Skip to content

Instantly share code, notes, and snippets.

@komeda-shinji
Created July 16, 2015 11:33
Show Gist options
  • Save komeda-shinji/33a82e7bd2175798c8db to your computer and use it in GitHub Desktop.
Save komeda-shinji/33a82e7bd2175798c8db to your computer and use it in GitHub Desktop.
rrdtool.spec diff
--- /root/rpmbuild/SPECS/rrdtool.spec 2012-04-06 06:40:37.000000000 +0900
+++ rrdtool.spec 2015-07-16 00:17:20.807304808 +0900
@@ -2,8 +2,15 @@
# Authority: matthias
# Upstream: Tobi Oetiker <oetiker$ee,ethz,ch>
+%define _prefix /usr/local
+%define _exec_prefix %{_prefix}
+%define _datadir %{_prefix}/share
+%define _libdir %{_exec_prefix}/lib64
+%define _mandir %{_datadir}/man
+%define dist .el6.local
+
### EL6 ships with rrdtool-1.3.8-6.el6
-%{?el6:# Tag: rfx}
+%{?el6:# Tag: rfx-local}
%{?el5:%define _without_egg_info 1}
%{?el4:%define _without_egg_info 1}
@@ -15,7 +22,8 @@
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
%define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
-%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
+#%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
+%define python_sitearch %{_libdir}/python2.6/site-packages
%define python_version %(%{__python} -c 'import string, sys; print string.split(sys.version, " ")[0]')
%define ruby_sitearch %(/usr/bin/ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
%define ruby_archdir %(/usr/bin/ruby -rrbconfig -e "puts Config::CONFIG['archdir']")
@@ -32,7 +40,7 @@
Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Source: http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{version}.tar.gz
-Source1: rrdcached.init
+Source1: rrdcached.local.init
Source2: rrdcached.sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -65,7 +73,7 @@
Requires: pango
Requires: python
Requires: ruby
-Requires: xorg-x11-fonts-Type1
+#Requires: xorg-x11-fonts-Type1
Requires: zlib
%description
@@ -149,8 +157,9 @@
%build
%configure \
+ --prefix=/usr/local \
--enable-ruby-site-install \
- --with-perl-options='INSTALLDIRS="vendor"' \
+ --with-perl-options='INSTALLDIRS="vendor" INSTALLMAN1DIR="%{_mandir}/man1" INSTALLMAN3DIR="%{_mandir}/man3" INSTALLVENDORMAN1DIR="%{_mandir}/man1" INSTALLVENDORMAN3DIR="%{_mandir}/man3"' \
--with-pic \
--with-tcllib="%{_libdir}"
%{__make}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment