configure / miller.spec experimenting before 6.0.0 release (#741)

This commit is contained in:
John Kerl 2021-11-09 22:34:25 -05:00 committed by GitHub
parent 82e4436607
commit 96d2f9e2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 109 additions and 13 deletions

4
.gitignore vendored
View file

@ -1,7 +1,7 @@
go/mlr
go/mlr.exe
./mlr
./mlr.exe
mlr
mlr.exe
a.out
*.dSYM
catc

View file

@ -3,7 +3,7 @@
build:
make -C go build
@echo Miller executable is: go/mlr
@echo "Miller executable is: ./mlr, or go\mlr.exe on Windows"
check:
make -C go check

27
configure vendored Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
usage() {
echo "Usage: $0 [--prefix {prefix directory}], e.g. /usr/local" 2>&1
exit 1
}
prefix="/usr/local"
if [ $# -eq 0 ]; then
echo "Using $prefix"
elif [ $# -ne 2 ]; then
usage
else
if [ "$1" != "--prefix" ]; then
usage
fi
# Test for read access, not write access, since people can ./configure, make,
# and make check outside of sudo and then make install inside sudo.
prefix="$2"
if [ ! -d "$prefix" ]; then
echo "$0: could not find prefix directory \"$prefix\""
exit 1
fi
fi
sed "s@PREFIX_TEMPLATE_IS_HERE@$prefix@" go/Makefile.in > go/Makefile
sed "s@PREFIX_TEMPLATE_IS_HERE@$prefix@" man/Makefile.in > man/Makefile

View file

@ -1,8 +1,11 @@
# TODO: take from ../configure
INSTALLDIR=/usr/local/bin
# Please edit Makefile.in rather than Makefile, which is overwritten by ../configure.
PREFIX=/usr
INSTALLDIR=$(PREFIX)/bin
# Attempt cp; will fail on Windows but ignore and continue
build:
go build
-cp mlr ..
check:
# Unit tests (small number)

28
go/Makefile.in Normal file
View file

@ -0,0 +1,28 @@
# Please edit Makefile.in rather than Makefile, which is overwritten by ../configure.
PREFIX=PREFIX_TEMPLATE_IS_HERE
INSTALLDIR=$(PREFIX)/bin
# Attempt cp; will fail on Windows but ignore and continue
build:
go build
-cp mlr ..
check:
# Unit tests (small number)
go test -v mlr/src/...
# Regression tests (large number)
#
# See ./regression_test.go for information on how to get more details
# for debugging. TL;DR is for CI jobs, we have 'go test -v'; for
# interactive use, instead of 'go test -v' simply use 'mlr regtest
# -vvv' or 'mlr regtest -s 20'. See also src/auxents/regtest.
go test -v
install: build
cp mlr $(INSTALLDIR)
fmt:
go fmt ./...
# Go does its own dependency management, outside of make.
.PHONY: build fmt

View file

@ -2,6 +2,10 @@
PUNCHDOWN LIST
* plan:
o conda etc
- get a link for rmd
- ./configure experiment
- miller.spec experiment
o blockers:
- fractional-strptime
- cmp-matrices

View file

@ -1,9 +1,11 @@
# Please edit Makefile.in rather than Makefile, which is overwritten by ../configure.
#
# Respective MANPATH entries would include /usr/local/share/man or $HOME/man.
# This should be run after make in the ../c directory but before make in the ../docs directory,
# since ../go/mlr is used to autogenerate ./manpage.txt which is used in ../docs.
# See also https://miller.readthedocs.io/en/latest/build.html#creating-a-new-release-for-developers
# TODO: take this from ./configure
INSTALLDIR=/usr/local/share/man/man1
PREFIX=/usr
INSTALLDIR=$(PREFIX)/share/man/man1
# This is normally done only on a development host. Through CI and
# package-installer, mlr.1 should be treated as an already-built artifact,

31
man/Makefile.in Normal file
View file

@ -0,0 +1,31 @@
# Please edit Makefile.in rather than Makefile, which is overwritten by ../configure.
#
# Respective MANPATH entries would include /usr/local/share/man or $HOME/man.
# This should be run after make in the ../c directory but before make in the ../docs directory,
# since ../go/mlr is used to autogenerate ./manpage.txt which is used in ../docs.
# See also https://miller.readthedocs.io/en/latest/build.html#creating-a-new-release-for-developers
PREFIX=PREFIX_TEMPLATE_IS_HERE
INSTALLDIR=$(PREFIX)/share/man/man1
# This is normally done only on a development host. Through CI and
# package-installer, mlr.1 should be treated as an already-built artifact,
# needing only to be copied to its install dir.
# Copying to man1/mlr1 is so that you can then put the Miller dir in your
# $MANPATH and do "man mlr".
build: .always
echo mkman start
./mkman.rb > mlr.1
./mkman.rb | groff -man -Tascii | col -b | expand -8 > manpage.txt
cp manpage.txt ../docs/src/
echo mkman end
mkdir ./man1
cp mlr.1 ./man1
install:
mkdir -p $(INSTALLDIR)
cp mlr.1 $(INSTALLDIR)/mlr.1
# ----------------------------------------------------------------
.always:
true

View file

@ -1,12 +1,14 @@
Summary: Name-indexed data processing tool
Name: miller
Version: 5.10.2
Version: 6.0.0
Release: 1%{?dist}
License: BSD
Source: https://github.com/johnkerl/miller/releases/download/%{version}/mlr-%{version}.tar.gz
URL: https://miller.readthedocs.io
# gcc for cgo transitive dependency
BuildRequires: golang
BuildRequires: gcc
BuildRequires: flex >= 2.5.35
BuildRequires: systemd-rpm-macros
%description
Miller (mlr) allows name-indexed data such as CSV and JSON files to be
@ -16,17 +18,16 @@ streams data where possible so its memory requirements stay small. It works
well with pipes and can feed "tail -f".
%prep
%setup -q -n mlr-%{version}
%autosetup
%build
%configure
%make_build
make build
%check
make check
%install
%make_install
make install
%files
%license LICENSE.txt