-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
.PHONY: build-deb clean | ||
|
||
.DELETE_ON_ERROR: | ||
|
||
VERSION=0.12.1 | ||
RESTIC_URL = https://github.com/restic/restic/releases/download/v$(VERSION)/restic_$(VERSION)_linux_amd64.bz2 | ||
|
||
RESTIC=usr/bin/restic | ||
RESTIC_MAN=usr/share/man/man1/restic.1 | ||
RESTIC_BASH_COMPLETION=usr/share/bash-completion/completions/restic | ||
DEB_CONTROL=restic-0.12.1/debian/control | ||
|
||
$(RESTIC): | ||
mkdir -p `dirname $@` | ||
curl -L $(RESTIC_URL) | bunzip2 > $@ | ||
chmod a+rx $@ | ||
|
||
$(RESTIC_BASH_COMPLETION): $(RESTIC) | ||
mkdir -p `dirname $@` | ||
$(RESTIC) generate --bash-completion $@ | ||
|
||
$(RESTIC_MAN): $(RESTIC) | ||
mkdir -p `dirname $@` | ||
$(RESTIC) generate --man `dirname $@` | ||
|
||
restic-$(VERSION).tgz: $(RESTIC_MAN) $(RESTIC_BASH_COMPLETION) | ||
fakeroot tar cf $@ --gzip ./usr | ||
|
||
# generate dirs + files directly needed to build .deb | ||
restic-$(VERSION): restic-$(VERSION).tgz | ||
fakeroot alien --generate --to-deb \ | ||
--description "restic backup program" \ | ||
$< | ||
|
||
restic_0.12.1-2_all.deb: restic-$(VERSION) | ||
sed -i 's|^Maintainer:.*|Maintainer: https://github.com/phlummox-dev/restic-deb/|' $(DEB_CONTROL) | ||
sed -i 's/^Architecture:.*/Architecture: amd64/' $(DEB_CONTROL) | ||
sed -i 's/^Section:.*/Section: utils/' $(DEB_CONTROL) | ||
echo "Homepage: https://github.com/restic/restic" >> $(DEB_CONTROL) | ||
cd $< && fakeroot ./debian/rules binary | ||
|
||
build-deb: restic_$(VERSION)-2_all.deb | ||
|
||
clean: | ||
-rm -rf restic* usr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
# restic-deb | ||
|
||
[restic][restic-repo], shoved into a .deb file (created | ||
using the [alien][alien] package converter). | ||
|
||
The .deb file contains the static binary, man pages, | ||
and bash-completion function. | ||
|
||
## rationale | ||
|
||
As at the time of writing (Jan 2022), the version of restic contained in | ||
the Ubuntu repositories is missing bugfixes and capabilities found in | ||
recent versions of restic (e.g. the ability to use [rclone][rclone] | ||
backends, added in restic 0.9.0 in 2018). | ||
|
||
So this repo downloads the static binary for restic 0.12.1 from the | ||
GitHub releases page for restic, uses it generate man pages and a bash | ||
completion file, and shoves it all into a .deb. | ||
|
||
[restic-repo]: https://github.com/restic/restic/ | ||
[alien]: https://sourceforge.net/projects/alien-pkg-convert/ | ||
[rclone]: https://github.com/rclone/rclone | ||
|
||
## copyright | ||
|
||
The restic binary and everything it generates are licensed under the BSD | ||
2-Clause "Simplified" License ([here][restic-license]). | ||
|
||
[restic-license]: https://github.com/restic/restic/blob/master/LICENSE | ||
|
||
Insofar as they represent anything copyrightable, the contents of this | ||
repo are placed in the public domain. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors of | ||
this software dedicate any and all copyright interest in the software to | ||
the public domain. We make this dedication for the benefit of the public | ||
at large and to the detriment of our heirs and successors. We intend | ||
this dedication to be an overt act of relinquishment in perpetuity of | ||
all present and future rights to this software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |