Skip to content

Commit

Permalink
Merge branch 'debian-package-cli'
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskuehl committed Jan 20, 2018
2 parents 31e5598 + 507c978 commit c3d8398
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
/venv

*.py[cod]
*.egg
*.egg-info

*.py[cod]
/*.build
/*.buildinfo
/*.changes
/*.deb
/.cache
/.coverage
/.coverage.*
/.tox
/.cache
/dist
/build
/cli/dist
/cli/build
/tmp
/settings.py

/cli/dist
/dist
/fluffy/static/**/*.hash
/fluffy/static/app.css
/fluffy/static/pygments.css
/fluffy/static/**/*.hash
/settings.py
/tmp
/venv
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Release process (server)

1. Bump version in `fluffy/__init__.py`
2. Run `make release`


## Release process (cli)

1. Bump version in `cli/fluffy_cli/__init__.py`
2. cd to `cli` and use `dch` to update the Debian changelog
3. Run `make release` and upload a new deb to GitHub releases.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ release: $(VENV) assets
cd cli && ../$(BIN)/python setup.py sdist
cd cli && ../$(BIN)/python setup.py bdist_wheel
cd cli && ../$(BIN)/twine upload --skip-existing dist/*
cd cli && debuild -us -uc -b

.PHONY: update-requirements
update-requirements:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ Two tools, `fput` and `fpb`, are provided. They can be installed with `pip
install fluffy` and used from the command line. Use `--help` with either tool
for more information.

Additionally, Debian packages for the command-line tools are available in the
[GitHub releases tab](https://github.com/chriskuehl/fluffy/releases). These
packages contain no binary components and should be compatible with most
releases of Debian and Ubuntu.


### Contributing, license, and credits

Expand Down
6 changes: 6 additions & 0 deletions cli/debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*.debhelper
/*.log
/*.substvars
/debhelper-build-stamp
/files
/fluffy
5 changes: 5 additions & 0 deletions cli/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fluffy (1.6.0) unstable; urgency=medium

* Initial Debian release.

-- Chris Kuehl <ckuehl@raziel.ckuehl.me> Fri, 19 Jan 2018 23:01:01 -0800
1 change: 1 addition & 0 deletions cli/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
17 changes: 17 additions & 0 deletions cli/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: fluffy
Section: utils
Priority: extra
Maintainer: Chris Kuehl <ckuehl@ckuehl.me>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.7
Vcs-Git: https://github.com/chriskuehl/fluffy
Vcs-Browser: https://github.com/chriskuehl/fluffy
Homepage: https://github.com/chriskuehl/fluffy

Package: fluffy
Architecture: all
Depends: python3
Description: command-line tools for uploading to fluffy servers
This package provides two command line scripts: fpb and fput.
.
fpb can be used to paste text to a fluffy server; fput is to upload files.
21 changes: 21 additions & 0 deletions cli/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/make -f
VERSION = $(shell python -c 'import fluffy_cli; print(fluffy_cli.__version__)')

%:
# Specifying buildsystem manually because otherwise it tries to be
# "smart" and use dh_python.
dh $@ --buildsystem makefile

override_dh_auto_build: ;

override_dh_auto_test: ;

override_dh_install:
mkdir -p debian/fluffy/usr/bin
cp fluffy_cli/main.py debian/fluffy/usr/bin/fpb
# This is pretty janky... we don't want to distribute the entire Python
# package (because the path will differ across distributions, e.g.
# /usr/lib/python3.4/dist-packages vs 3.5 vs 3.6) so we just insert it into
# the file
sed -i "s/^from fluffy_cli import __version__$$/__version__ = '$(VERSION)'/" debian/fluffy/usr/bin/fpb
ln -s fpb debian/fluffy/usr/bin/fput
1 change: 1 addition & 0 deletions cli/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)

0 comments on commit c3d8398

Please sign in to comment.