Add fix-mime-types-git
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
pkgbase = fix-mime-types-git
|
||||||
|
pkgdesc = A utility script to fix incorrect MIME types for files.
|
||||||
|
pkgver = r1.9499a4f
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://git.svetikas.lt/JustAnyone/fix-mime-types
|
||||||
|
arch = x86_64
|
||||||
|
license = MIT
|
||||||
|
makedepends = go
|
||||||
|
makedepends = git
|
||||||
|
depends = glibc
|
||||||
|
provides = fix-mime-types
|
||||||
|
source = git+https://git.svetikas.lt/JustAnyone/fix-mime-types.git
|
||||||
|
md5sums = SKIP
|
||||||
|
|
||||||
|
pkgname = fix-mime-types-git
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
/*
|
||||||
|
!/.gitignore
|
||||||
|
!/.SRCINFO
|
||||||
|
!/PKGBUILD
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Maintainer: Dominykas Svetikas <dominykas@svetikas.lt>
|
||||||
|
|
||||||
|
pkgname=fix-mime-types-git
|
||||||
|
_pkgname=fix-mime-types
|
||||||
|
pkgver=r1.9499a4f
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A utility script to fix incorrect MIME types for files."
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://git.svetikas.lt/JustAnyone/fix-mime-types"
|
||||||
|
license=('MIT')
|
||||||
|
makedepends=('go' 'git')
|
||||||
|
depends=('glibc')
|
||||||
|
provides=('fix-mime-types')
|
||||||
|
source=("git+$url.git")
|
||||||
|
md5sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
export GOPATH="${srcdir}"
|
||||||
|
go mod download
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$_pkgname"
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||||
|
go build -v -o fix-mime-types .
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_pkgname" || return
|
||||||
|
install -D -m755 fix-mime-types "$pkgdir/usr/bin/fix-mime-types"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user