Add RPM building .spec file from Devrim Gunduz
authorGreg Smith <gsmith@truviso.com>
Wed, 28 Oct 2009 22:20:33 +0000 (18:20 -0400)
committerGreg Smith <gsmith@truviso.com>
Wed, 28 Oct 2009 22:20:33 +0000 (18:20 -0400)
pgtune-settingsdir.patch [new file with mode: 0644]
pgtune.spec [new file with mode: 0644]

diff --git a/pgtune-settingsdir.patch b/pgtune-settingsdir.patch
new file mode 100644 (file)
index 0000000..3d29228
--- /dev/null
@@ -0,0 +1,11 @@
+--- pgtune.old
++++ pgtune
+@@ -414,7 +414,7 @@ def ReadOptions():
+   parser.add_option('-D','--debug',action="store_true",dest="debug",
+     default="False",help="Enable debugging mode")
+-  parser.add_option('-S','--settings',dest="settings_dir",default=None, 
++  parser.add_option('-S','--settings',dest="settings_dir",default="/usr/share/pgtune", 
+     help="Directory where settings data files are located at.  Defaults to the directory where the script is being run from")
+   options,args=parser.parse_args()
diff --git a/pgtune.spec b/pgtune.spec
new file mode 100644 (file)
index 0000000..0471d68
--- /dev/null
@@ -0,0 +1,47 @@
+Summary:       PostgreSQL Config Tuner
+Name:          pgtune
+Version:       0.9.2
+Release:       1%{?dist}
+License:       BSD
+Group:         Applications/Databases
+URL:           http://pgfoundry.org/projects/pgtune
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Source0:       http://pgfoundry.org/frs/download.php/2445/%{name}-%{version}.tar.gz
+Patch0:                pgtune-settingsdir.patch
+Requires:      postgresql-server
+Buildarch:     noarch
+
+%description
+pgtune takes the wimpy default postgresql.conf and expands the database server 
+to be as powerful as the hardware it's being deployed on.
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch0 -p0
+
+%build
+
+%install
+rm -rf %{buildroot}
+install -d %{buildroot}%{_bindir}
+install -d %{buildroot}%{_datadir}/%{name}
+
+install -m 755 pgtune %{buildroot}%{_bindir}
+install -m 644 -p pg_settings* %{buildroot}%{_datadir}/%{name}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(0644,root,root,0755)
+%doc TODO COPYRIGHT
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*
+%attr(755,root,root) %{_bindir}/pgtune
+
+%changelog
+* Wed Oct 28 2009 Devrim Gunduz <devrim@commandprompt.com> 0.9.1-1
+- Initial packaging for PostgreSQL RPM Repository
+* Wed Oct 28 2009 Greg Smith <gsmith@gregsmith.com> 0.9.2-1
+- Added copyright file, doesn't install sample postgresql.conf file.