From 72888fa25177bb82575af563a9eb80047122c7aa Mon Sep 17 00:00:00 2001 From: Martin Kampas Date: Thu, 11 May 2017 16:36:54 +0200 Subject: [PATCH] Add Mer packaging (imported from commit 0c69bf4093bd1e2af3d5bd51d2ac6156d2909a81) Signed-off-by: Martin Kampas --- rpm/osc.spec | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ rpm/osc.yaml | 30 +++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 rpm/osc.spec create mode 100644 rpm/osc.yaml diff --git a/rpm/osc.spec b/rpm/osc.spec new file mode 100644 index 0000000..2c4b9f2 --- /dev/null +++ b/rpm/osc.spec @@ -0,0 +1,91 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.27 +# + +Name: osc + +# >> macros +# << macros + +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +Summary: OpenSUSE Build Service Commander +Version: 0.146.0 +Release: 1 +Group: Development/Tools/Other +License: GPL v2 or later +BuildArch: noarch +URL: http://www.gitorious.org/opensuse/osc +Source0: osc-%{version}.tar.bz2 +Source100: osc.yaml +Requires: python-urlgrabber +Requires: m2crypto > 0.19 +Requires: /usr/bin/less +Requires: /usr/bin/diff3 +BuildRequires: python-devel +BuildRequires: python-urlgrabber +BuildRequires: m2crypto + +%description +Commandline client for the openSUSE Build Service. + +See http://en.opensuse.org/Build_Service/CLI , as well as +http://en.opensuse.org/Build_Service_Tutorial for a general +introduction. + + +%prep +%setup -q + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build + +# >> build post +# << build post + +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%{__python} setup.py install --root=%{buildroot} -O1 + +# >> install post +ln -s osc-wrapper.py %{buildroot}/%{_bindir}/osc +mkdir -p %{buildroot}/var/lib/osc-plugins +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +install -m 0755 dist/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh +install -m 0755 dist/complete.sh %{buildroot}%{_sysconfdir}/profile.d/osc.sh +%if 0%{?suse_version} > 1110 +mkdir -p %{buildroot}%{_prefix}/lib/osc +install -m 0755 dist/osc.complete %{buildroot}%{_prefix}/lib/osc/complete +%else +mkdir -p %{buildroot}%{_prefix}/%{_lib}/osc +install -m 0755 dist/osc.complete %{buildroot}%{_prefix}/%{_lib}/osc/complete +%endif + + +# << install post + +%files +%defattr(-,root,root,-) +# >> files +%{_bindir}/osc* +%{python_sitelib}/* +%{_sysconfdir}/profile.d/* +%if 0%{?suse_version} > 1110 +%dir %{_prefix}/lib/osc +%{_prefix}/lib/osc/* +%else +%dir %{_prefix}/%{_lib}/osc +%{_prefix}/%{_lib}/osc/* +%endif +%dir /var/lib/osc-plugins +%doc AUTHORS README TODO NEWS +%doc %_mandir/man1/osc.* +# << files diff --git a/rpm/osc.yaml b/rpm/osc.yaml new file mode 100644 index 0000000..6d29eb3 --- /dev/null +++ b/rpm/osc.yaml @@ -0,0 +1,30 @@ +Name: osc +Summary: OpenSUSE Build Service Commander +Version: 0.146.0 +Release: 1 +Group: Development/Tools/Other +License: GPL v2 or later +URL: http://www.gitorious.org/opensuse/osc +Sources: + - osc-%{version}.tar.bz2 +Description: | + Commandline client for the openSUSE Build Service. + + See http://en.opensuse.org/Build_Service/CLI , as well as + http://en.opensuse.org/Build_Service_Tutorial for a general + introduction. +Requires: + - python-urlgrabber + - m2crypto > 0.19 + - /usr/bin/less + - /usr/bin/diff3 +PkgBR: + - python-devel + - python-urlgrabber + - m2crypto +Configure: none +Builder: python +BuildArch: noarch +Recommends: + - build > 2010.11.24 +SetupOptions: -q