diff options
author | Wu Junyu | 2023-05-05 23:50:49 +0900 |
---|---|---|
committer | Wu Junyu | 2023-05-05 23:50:49 +0900 |
commit | 06cfd1656db854a73ec30be741d96bdf20f223ba (patch) | |
tree | e727e1a6f204ce7b21f6b63b0f27d009969ac8df | |
parent | 55e0571b21aa1ac4ef87fc55a4de2d3d399247b5 (diff) | |
download | aur-06cfd1656db854a73ec30be741d96bdf20f223ba.tar.gz |
Fix ldflags injection.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | lastfm_auth | 4 |
3 files changed, 14 insertions, 3 deletions
@@ -13,6 +13,8 @@ pkgbase = go-musicfox conflicts = go-musicfox-bin conflicts = musicfox source = go-musicfox-4.0.5.tar.gz::https://github.com/anhoder/go-musicfox/archive/v4.0.5/v4.0.5.tar.gz + source = lastfm_auth sha256sums = 3a7e9860340d6027443404fda5df725e06d5276cbfc9c53ecbf03d244e4762a9 + sha256sums = 1798a98fc0b986c690f0dc93b4f475b03f18cc72abf2825cbffcaa78cd869df2 pkgname = go-musicfox @@ -10,8 +10,10 @@ provides=('musicfox') conflicts=('go-musicfox-bin' 'musicfox') depends=('flac' 'alsa-lib') makedepends=('gcc-objc' 'go') -source=(go-musicfox-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz) -sha256sums=('3a7e9860340d6027443404fda5df725e06d5276cbfc9c53ecbf03d244e4762a9') +source=("go-musicfox-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz" + "lastfm_auth") +sha256sums=('3a7e9860340d6027443404fda5df725e06d5276cbfc9c53ecbf03d244e4762a9' + '1798a98fc0b986c690f0dc93b4f475b03f18cc72abf2825cbffcaa78cd869df2') build(){ cd go-musicfox-${pkgver} @@ -20,7 +22,10 @@ build(){ export CGO_CFLAGS="${CFLAGS}" export CGO_CPPFLAGS="${CPPFLAGS}" export GOPATH=${srcdir} - go build -o ../musicfox -ldflags "-s -w -X go-musicfox/pkg/constants.AppVersion=v${pkgver}" cmd/musicfox.go + go build -o ../musicfox -ldflags "-s -w \ + -X 'github.com/go-musicfox/go-musicfox/pkg/constants.AppVersion=v${pkgver}' \ + -X 'github.com/go-musicfox/go-musicfox/pkg/constants.LastfmKey=$(awk 'NR==1{print $3}' $HOME/.go-musicfox/lastfm_auth)' \ + -X 'github.com/go-musicfox/go-musicfox/pkg/constants.LastfmSecret=$(awk 'NR==2{print $3}' $HOME/.go-musicfox/lastfm_auth)' " cmd/musicfox.go } package() { diff --git a/lastfm_auth b/lastfm_auth new file mode 100644 index 000000000000..97bb39470e28 --- /dev/null +++ b/lastfm_auth @@ -0,0 +1,4 @@ +key : <Your LastFM API key> +secret : <Your LastFM API secret> +# This is only a template. Replace with your own key +# and secret, and copy to $HOME/.go-musicfox directory.
\ No newline at end of file |