Browse Source

caddy package creation

Signed-off-by: webbuilder_pel7ppc64lebuilder0 <webbuilder@powerel.org>
master
webbuilder_pel7ppc64lebuilder0 2 years ago
parent
commit
ee58378491
  1. 48
      SPECS/caddy.spec

48
SPECS/caddy.spec

@ -0,0 +1,48 @@
%define debug_package %{nil}

Name : caddy
Version : 2.4.6
Release : 1%{?dist}
Summary : Fast, multi-platform web server with automatic HTTPS
Group : System/Web
License : Apache License
URL : https://caddyserver.com/
BuildRequires : golang
BuildRequires : git
Requires : git


%description


%prep
%setup -T -q -c %{name}-%{version}
export GOPATH=`pwd`
export GO111MODULE=on
mkdir -p go/src/github.com/caddyserver/
cd go/src/github.com/caddyserver/
git clone https://github.com/caddyserver/caddy



%build
export GOPATH=`pwd`/go
export GO111MODULE=on
cd go/src/github.com/caddyserver/caddy/
git checkout tags/v%{version}
export SHORTCOMMIT=$(git rev-parse --short HEAD)
export BUILDDATE=$(date +%Y%m%d)
#go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/gohugoio/hugo/common/hugo.buildDate="$BUILDDATE"' -X 'github.com/gohugoio/hugo/common/hugo.commitHash="$SHORTCOMMIT"'" -o caddyserver
go build -x -v -trimpath -ldflags "-extldflags" -o caddyserver ./cmd/caddy


%install
install -p -D -m 0555 go/src/github.com/caddyserver/caddy/caddyserver %{buildroot}%{_bindir}/caddy


%files
%doc
%{_bindir}/caddy


%changelog
Loading…
Cancel
Save