summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--env-pastebin.patch11
-rw-r--r--pastebinit.spec6
2 files changed, 15 insertions, 2 deletions
diff --git a/env-pastebin.patch b/env-pastebin.patch
new file mode 100644
index 0000000..5ee581f
--- /dev/null
+++ b/env-pastebin.patch
@@ -0,0 +1,11 @@
+--- pastebinit-1.3/pastebinit~ 2012-03-10 10:40:09.143624411 +0200
++++ pastebinit-1.3/pastebinit 2012-03-09 23:25:19.581314931 +0200
+@@ -183,7 +179,7 @@
+ print _("\t-u <username> -p <password>")
+
+ # Set defaults
+- website = defaultPB
++ website = os.environ.get("PASTEBIN") or defaultPB
+ user = os.environ.get('USER')
+ jabberid = ""
+ title = ""
diff --git a/pastebinit.spec b/pastebinit.spec
index 8100f19..30cd443 100644
--- a/pastebinit.spec
+++ b/pastebinit.spec
@@ -2,11 +2,12 @@ Summary: Command line Pastebin
Summary(pl.UTF-8): Pastebin działający z linii poleceń
Name: pastebinit
Version: 1.3
-Release: 1
+Release: 2
License: GPL v2+
Group: Applications
Source0: http://launchpad.net/pastebinit/trunk/%{version}/+download/%{name}-%{version}.tar.gz
# Source0-md5: 0c7dc52245fb92967de641cd3ccffbc3
+Patch0: env-pastebin.patch
URL: https://launchpad.net/pastebinit
BuildRequires: gettext-devel
BuildRequires: rpm-pythonprov
@@ -28,6 +29,7 @@ standardowego wyjścia, a on przeklei informacje na Pastebin.
%prep
%setup -q
+%patch0 -p1
%{__sed} -i -e 's#http://pastebin.com#http://pld.pastebin.com#g' pastebinit
@@ -38,7 +40,7 @@ standardowego wyjścia, a on przeklei informacje na Pastebin.
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir}/pastebin.d,%{_bindir},%{_datadir}/locale}
install -p pastebinit $RPM_BUILD_ROOT%{_bindir}/%{name}
-cp -a pastebin.d/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/pastebin.d
+cp -p pastebin.d/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/pastebin.d
cp -a po/mo/* $RPM_BUILD_ROOT%{_datadir}/locale
%find_lang %{name}