Skip to content

Commit

Permalink
Rhel9 (#31)
Browse files Browse the repository at this point in the history
* replace glide with go mod and update spec

* fix in Makefile

---------

Co-authored-by: David Vanhoucke <dvanhoucke@redborder.com>
  • Loading branch information
manegron and davidredborder authored Nov 8, 2023
1 parent ef62655 commit b25ce53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ coverage:
@grep -h -v "mode: count" *.part >> coverage.out
@go tool cover -func coverage.out

GLIDE := $(shell command -v glide 2> /dev/null)
vendor:
ifndef GLIDE
$(error glide is not installed)
endif
@printf "$(MKL_BLUE)[DEPS]$(MKL_CLR_RESET) Resolving dependencies\n"
@glide install
@go mod init
@go mod tidy
@go mod vendor

clean:
rm -f $(BIN)
Expand Down
18 changes: 5 additions & 13 deletions packaging/rpm/redborder-events-counter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ License: GNU AGPLv3
URL: https://github.com/redBorder/events-counter
Source0: %{name}-%{version}.tar.gz

BuildRequires: go = 1.6.3
BuildRequires: glide rsync gcc git
BuildRequires: rsync mlocate pkgconfig
BuildRequires: librd-devel = 0.1.0
#BuildRequires: librdkafka-devel

Requires: librd0 librdkafka1
BuildRequires: go rsync gcc git pkgconfig librd-devel librdkafka-devel
Requires: librd0 librdkafka

Summary: Counts bytes of kafka topics
Group: Development/Libraries/Go
Expand All @@ -24,15 +19,10 @@ Group: Development/Libraries/Go
%setup -qn %{name}-%{version}

%build
git clone --branch v0.9.2 https://github.com/edenhill/librdkafka.git /tmp/librdkafka-v0.9.2
cd /tmp/librdkafka-v0.9.2
./configure --prefix=/usr --sbindir=/usr/bin --exec-prefix=/usr && make
make install
cd -
ldconfig
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
export GOPATH=${PWD}/gopath
export PATH=${GOPATH}:${PATH}

mkdir -p $GOPATH/src/github.com/redBorder/events-counter
rsync -az --exclude=gopath/ ./ $GOPATH/src/github.com/redBorder/events-counter
cd $GOPATH/src/github.com/redBorder/events-counter
Expand Down Expand Up @@ -73,5 +63,7 @@ systemctl daemon-reload
/usr/lib/systemd/system/redborder-events-counter.service

%changelog
* Wed Oct 04 2023 David Vanhoucke <dvanhoucke@redborder.com> - 2.0.0-1
- adapt for go mod
* Mon Oct 04 2021 Miguel Negrón <manegron@redborder.com> & David Vanhoucke <dvanhoucke@redborder.com> - 1.0.0-1
- first spec version

0 comments on commit b25ce53

Please sign in to comment.