Skip to content

Commit

Permalink
Fixes #15853: Missing rudder-api-client folder in rudder-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdall committed Oct 4, 2019
1 parent 6368786 commit b4a55b2
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rudder-api-client/Makefile
@@ -0,0 +1,4 @@
.DEFAULT_GOAL := build
# Used on debian to redirect calls to final Makefile so dh auto commands work
%:
make -C BUILD/rudder-api-client/ --debug $@
3 changes: 3 additions & 0 deletions rudder-api-client/SOURCES/.dependencies
@@ -0,0 +1,3 @@
sles-12:python python-requests
sles-15:python python-requests
rhel-7:python python-requests
Empty file.
99 changes: 99 additions & 0 deletions rudder-api-client/SPECS/rudder-api-client.spec
@@ -0,0 +1,99 @@
#####################################################################################
# Copyright 2019 Normation SAS
#####################################################################################
# This program is free software: you can redistribute it and/or modify
# Licensed under the Apache License, Version 2.0 (the "License");
# it under the terms of the GNU General Public License as published by
# you may not use this file except in compliance with the License.
# the Free Software Foundation, Version 3.
# You may obtain a copy of the License at
#
# This program is distributed in the hope that it will be useful,
# http://www.apache.org/licenses/LICENSE-2.0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# Unless required by applicable law or agreed to in writing, software
# along with this program. If not, see <http://www.gnu.org/licenses/>.
######################################################################################

#=================================================
# Variables
#=================================================
%define real_name rudder-api-client
%define real_epoch 0
%define real_version 1

# avoid error during byte compilation of pyc since they are removed anyway
%define _python_bytecompile_errors_terminate_build 0

#=================================================
# Header
#=================================================
Summary: Command line tools and python libraries to call Rudder
Name: %{real_name}
Version: %{real_version}
Release: 1%{?dist}
Epoch: %{real_epoch}
License: Apache-2.0
URL: https://www.rudder.io/
Source: rudder-sources.tar.bz2

Group: Applications/System

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

AutoReq: 0
AutoProv: 0

## Python 2
BuildRequires: python, python-requests
Requires: python, python-requests

%description
Command line tools and python libraries to call Rudder.

#=================================================
# Source preparation
#=================================================
%prep
%setup -c

# Force python everywhere in 5.0
find . -type f | xargs sed -i '1,1s|#!/usr/bin/python3|#!/usr/bin/python|'

#=================================================
# Installation
#=================================================
%install
cd rudder-sources-*/rudder-api-client/

make --debug install DESTDIR=%{buildroot}

#=================================================
# Cleaning
#=================================================
%clean
cd rudder-sources-*/rudder-api-client/
make clean
rm -rf %{buildroot}

#=================================================
# Files
#=================================================
%files -n rudder-api-client
%defattr(-, root, root, 0755)
/usr/share/rudder-api-client/rudder.py
/usr/bin/rudder-cli
%exclude /usr/share/rudder-api-client/rudder.pyc
%exclude /usr/share/rudder-api-client/rudder.pyo

#=================================================
# Changelog
#=================================================
%changelog
* Wed Nov 22 2017 - Rudder Team <dev@rudder.io> %{version}
- See https://docs.rudder.io/changelogs/current/index.html for changelogs

5 changes: 5 additions & 0 deletions rudder-api-client/debian/changelog
@@ -0,0 +1,5 @@
rudder-api-client (2.3.0~alpha~git-0) lenny; urgency=low

* See https://www.rudder-project.org/site/documentation/user-manual/ for changelogs

-- Rudder Team <rudder-dev@rudder-project.org> Wed, 22 Nov 2017 11:47:27 +0000
1 change: 1 addition & 0 deletions rudder-api-client/debian/compat
@@ -0,0 +1 @@
9
12 changes: 12 additions & 0 deletions rudder-api-client/debian/control
@@ -0,0 +1,12 @@
Source: rudder-api-client
Section: web
Priority: extra
Maintainer: Rudder Team <dev@rudder.io>
Build-Depends: debhelper (>= 9), python, python-requests
Standards-Version: 3.8.0
Homepage: https://www.rudder.io

Package: rudder-api-client
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python, python-requests
Description: Command line tools and python libraries to call Rudder
15 changes: 15 additions & 0 deletions rudder-api-client/debian/copyright
@@ -0,0 +1,15 @@
This package was debianized by:

Jonathan Clarke <jonathan.clarke@normation.com> on Tue, 06 Oct 2009 01:20:26 +0200

Upstream Author(s):

Normation - http://www.normation.com

Copyright:

Copyright (C) 2019 Normation SAS

License:

Apache-2.0
24 changes: 24 additions & 0 deletions rudder-api-client/debian/rules
@@ -0,0 +1,24 @@
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

override_dh_auto_clean:
rm -rf BUILD

override_dh_auto_build:
# Force python everywhere in 5.0
find . -type f | xargs sed -i '1,1s|#!/usr/bin/python3|#!/usr/bin/python|'
tar -xjf SOURCES/rudder-sources.tar.bz2
mkdir BUILD
mv rudder-sources-*/* BUILD/
dh_auto_build

# The root Makefile has all possible target and prevent dh to autodetect them
# We have no test
override_dh_auto_test:

# Default rule that guess what to do for missing targets
%:
dh $@

0 comments on commit b4a55b2

Please sign in to comment.