Commit a4ce9906 authored by Jochen Sprickerhof's avatar Jochen Sprickerhof

Initial packaging

parent 11e38abf
fdroidcl (0.3.1-1) unstable; urgency=medium
* Initial release (Closes: #863013)
-- Jochen Sprickerhof <jspricke@debian.org> Fri, 19 May 2017 21:30:21 +0200
Source: fdroidcl
Section: devel
Priority: extra
Maintainer: Debian Go Packaging Team <pkg-go-maintainers@lists.alioth.debian.org>
Uploaders: Jochen Sprickerhof <jspricke@debian.org>
Build-Depends: debhelper (>= 10),
dh-golang,
golang-any
Standards-Version: 3.9.8
Homepage: https://github.com/mvdan/fdroidcl
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/fdroidcl.git
Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/fdroidcl.git
XS-Go-Import-Path: github.com/mvdan/fdroidcl
Package: fdroidcl
Architecture: any
Built-Using: ${misc:Built-Using}
Depends: ${shlibs:Depends},
${misc:Depends},
adb
Description: F-Droid desktop client
F-Droid (https://f-droid.org/) desktop client.
.
While the Android client integrates with the system
with regular update checks and notifications, this is a
command line client that talks to connected devices via ADB
(https://developer.android.com/tools/help/adb.html). Quickstart Download
the index: fdroidcl update
Package: golang-github-mvdan-fdroidcl-dev
Architecture: all
Depends: ${misc:Depends}
Description: fdroidcl develpoment files
F-Droid (https://f-droid.org/) desktop client.
.
While the Android client integrates with the system
with regular update checks and notifications, this is a
command line client that talks to connected devices via ADB
(https://developer.android.com/tools/help/adb.html). Quickstart Download
the index: fdroidcl update
.
This package provides development files.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: fdroidcl
Source: https://github.com/mvdan/fdroidcl
Files: *
Copyright: 2015 Daniel Martí
License: BSD-3-clause
Files: debian/*
Copyright: 2017 Jochen Sprickerhof <jspricke@debian.org>
License: BSD-3-clause
Comment: Debian packaging is licensed under the same terms as upstream
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[DEFAULT]
pristine-tar = True
From: Jochen Sprickerhof <jspricke@debian.org>
Date: Fri, 19 May 2017 21:31:51 +0200
Subject: Replace basedir dependency by implementation
Take from:
https://github.com/mvdan/basedir/commit/9988eb38426ccd70e0eeeced8c2fc04d9cc4133b
---
cmd/fdroidcl/main.go | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/cmd/fdroidcl/main.go b/cmd/fdroidcl/main.go
index 35a05fb..977e25c 100644
--- a/cmd/fdroidcl/main.go
+++ b/cmd/fdroidcl/main.go
@@ -11,7 +11,7 @@ import (
"path/filepath"
"strings"
- "github.com/mvdan/basedir"
+ "os/user"
)
const cmdName = "fdroidcl"
@@ -31,8 +31,29 @@ func subdir(dir, name string) string {
return p
}
+func firstGetenv(def string, evs ...string) string {
+ for _, ev := range evs {
+ if v := os.Getenv(ev); v != "" {
+ return v
+ }
+ }
+ home, err := homeDir()
+ if err != nil {
+ return ""
+ }
+ return filepath.Join(home, def)
+}
+
+func homeDir() (string, error) {
+ curUser, err := user.Current()
+ if err != nil {
+ return "", err
+ }
+ return curUser.HomeDir, nil
+}
+
func mustCache() string {
- dir := basedir.Cache()
+ dir := firstGetenv(".cache", "XDG_CACHE_HOME")
if dir == "" {
errExit("Could not determine cache dir\n")
}
@@ -40,7 +61,7 @@ func mustCache() string {
}
func mustData() string {
- dir := basedir.Data()
+ dir := firstGetenv(".config", "XDG_CONFIG_HOME")
if dir == "" {
errExit("Could not determine data dir\n")
}
0001-Replace-basedir-dependency-by-implementation.patch
#!/usr/bin/make -f
%:
dh $@ --buildsystem=golang --with=golang
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/fdroidcl-\$1\.tar\.gz/,\\
uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \\
https://github.com/mvdan/fdroidcl/tags .*/v?(\d\S*)\.tar\.gz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment