Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vince-weka committed Feb 14, 2025
1 parent 124ee99 commit 5aee179
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


SOURCE=SOURCES/weka-tools.tgz
SPECS=$(wildcard SPECS/*)

TARG=RPMS/noarch/weka-tools-8.10-1.el8.x86_64.rpm
.PHONY: all clean Makefile

all: ${SOURCE} ${TARG}
echo Done

${TARG}: ${SOURCE} ${SPECS}
rpmbuild --define "_topdir ${CURDIR}" -ba ${SPECS}

${SOURCE}:
tar -czvf ${SOURCE} --exclude-from=tar_excludes.txt *

clean:
rm -rf ${TARG} BUILD BUILDROOT RPMS SRPMS ${SOURCE}/*
46 changes: 46 additions & 0 deletions SPECS/wekatools.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Name: weka-tools
Version: 1.0
Release: 1%{?dist}
Summary: WEKA Tools Collection
BuildArch: x86_64

License: GPL
URL: https://weka.io

# unset __brp_mangle_shebangs - it chokes on ansible files.
%define __brp_mangle_shebangs /usr/bin/true


Requires: coreutils
Requires: tar
Requires: findutils

# These all get installed in /opt/tools
Source0: weka-tools.tgz

%define destdir /opt/tools

%description
WEKA Tools Collection

%build
echo Good

%install
rm -rf $RPM_BUILD_ROOT

install -d -m 0755 %{buildroot}%{destdir}
tar xvf %{SOURCE0} -C %{buildroot}%{destdir}

%pre
# detach it from the git repo, if it exists
if [ -d %{destdir}/.git ]; then
rm -rf %{destdir}/.git
fi

%files
%{destdir}/*

%changelog
* Thu Feb 13 2025 Vince Fleming <vince@weka.io>
--
9 changes: 9 additions & 0 deletions tar_excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tar_excludes.txt
.git*
BUILD*
RPMS
S*
Makefile
CNAME
_config.yml
.vscode

0 comments on commit 5aee179

Please sign in to comment.