# exec_prefix die die die
bindir="@prefix@/bin"
datadir="@prefix@/share"
- mkdir -p %DESTDIR/"$bindir"
- mkdir -p %DESTDIR/"$datadir/goals"
- install src/goals %DESTDIR/"$bindir" -m 0755
- install %stdlibfiles %DESTDIR/"$datadir"/goals -m 644
+ mkdir -p %DESTDIR"$bindir"
+ mkdir -p %DESTDIR"$datadir/goals"
+ install src/goals %DESTDIR"$bindir" -m 0755
+ install %stdlibfiles %DESTDIR"$datadir"/goals -m 644
}
#----------------------------------------------------------------------
"configure",
"configure.ac",
wildcard ("docs/*.pod"),
+ "goals.spec.in",
"install-sh",
"m4/ocaml.m4",
"run.in",
goal maintainer-release = : dist,
maintainer-check-extra-dist,
distcheck,
- maintainer-upload
+ maintainer-upload,
+ maintainer-srpm,
+ maintainer-fedora-copr
let websitedir = "%HOME/d/websites/people.redhat.com/goals"
# XXX Should actually use the *url tactic here.
-goal maintainer-upload = {
+goal maintainer-upload = : distcheck {
[ -d %websitedir ]
cp %tarfile %websitedir/files
cp README %websitedir/README
cd ..
./.rsync
}
+
+pure function get-fedora-dist () returning string = @{
+ rpm --eval '%%dist'
+}
+let fedora-dist = get-fedora-dist ()
+let srpm = "goals-@PACKAGE_VERSION@%fedora-dist.src.rpm"
+
+goal maintainer-srpm =
+"%srpm" : tarfile, "goals.spec" {
+ rpmbuild -bs \
+ --define "%%_sourcedir $PWD" \
+ --define "%%_srcrpmdir $PWD" \
+ goals.spec
+}
+
+goal maintainer-fedora-copr = : maintainer-upload, srpm {
+ copr build rjones/goals %srpm
+}
\ No newline at end of file
# Pass through normal targets to Goalfile.in
all clean depend install check maintainer-clean dist distcheck \
-maintainer-check-extra-dist maintainer-release: src/goals
- @./run src/goals $@
+maintainer-check-extra-dist maintainer-release \
+maintainer-srpm maintainer-fedora-copr: src/goals
+ @./run src/goals $@ 'DESTDIR="$(DESTDIR)"'
# If src/goals doesn't exist then brute-force build it. Once we have
# src/goals we can rebuild it and other parts of the project using
--- /dev/null
+Name: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Release: 1%{?dist}
+Summary: An experimental tool that generalizes "make"
+
+License: GPLv2+
+URL: https://people.redhat.com/~rjones/goals/
+
+Source0: https://people.redhat.com/~rjones/goals/files/%{name}-%{version}.tar.gz
+
+BuildRequires: ocaml
+BuildRequires: ocaml-findlib
+BuildRequires: ocaml-menhir
+BuildRequires: perl-podlators
+
+
+%description
+Make is a clever tool for expressing dependencies between files and it
+is widely used for building software. But it has some limitations.
+It only knows about files. It has limited ways to write rules. And
+for a tool whose main job is running shell commands, there are several
+gotchas when you actually write shell commands.
+
+Goals is an experimental tool which aims to generalize make beyond
+these limitations.
+
+
+%prep
+%autosetup -p1
+
+
+%build
+%configure
+make %{?_smp_mflags}
+
+
+%install
+%make_install
+
+
+%check
+make %{?_smp_mflags} check
+
+
+%files
+%doc README TODO
+%license COPYING
+%{_bindir}/goals
+%dir %{_datadir}/goals
+%{_datadir}/goals/*.gl
+%{_datadir}/goals/*.sh
+
+
+%changelog
+* Sat Jan 18 2020 Richard W.M. Jones <rjones@redhat.com> - %{version}-1
+- Version %{version}.