## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.9.0 # Tests are skipped because they rely on dktest, a container testing harness # that expects to have access to the Internet as well as a running docker daemon # on the test host. %bcond_with check # Passed to %%gobuild via the environment variable BUILDTAGS. # Build the migrate program with a subset of databases and sources enabled. Add # the database or source here when adding additional dependencies to this # package. %global _gobuildtags file iofs sqlite3 postgres # https://github.com/golang-migrate/migrate %global goipath github.com/golang-migrate/migrate Version: 4.16.2 %gometa -f %global common_description %{expand: Go database migrations library and program.} %global golicenses LICENSE %global godocs CONTRIBUTING.md \\\ FAQ.md \\\ GETTING_STARTED.md \\\ MIGRATIONS.md \\\ README.md \\\ SECURITY.md \\\ migrate-README.md \\\ sqlite3-README.md \\\ iofs-README.md Name: %{goname} Release: %autorelease Summary: Go database migrations library and program License: MIT URL: %{gourl} Source: %{gosource} # Do not use %%go_generate_buildrequires; the list of built-in sources and # databases is maintained manually (see _gobuildtags above). # General dependencies BuildRequires: golang(github.com/hashicorp/go-multierror) BuildRequires: golang(go.uber.org/atomic) BuildRequires: golang(github.com/stretchr/testify/assert) # Database dependencies BuildRequires: golang(github.com/lib/pq) BuildRequires: golang(github.com/mattn/go-sqlite3) # Source dependencies %description %{common_description} %gopkg %prep %goprep %autopatch -p1 %build for cmd in cmd/* ; do BUILDTAGS="%{_gobuildtags}" %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ mv cmd/migrate/README.md migrate-README.md mv database/sqlite3/README.md sqlite3-README.md mv source/iofs/README.md iofs-README.md %if %{with check} %check %gocheck %endif %files %license LICENSE %doc CONTRIBUTING.md %doc FAQ.md %doc GETTING_STARTED.md %doc MIGRATIONS.md %doc README.md %doc SECURITY.md %doc migrate-README.md %doc sqlite3-README.md %doc iofs-README.md %{_bindir}/* %gopkgfiles %changelog * Mon Jul 17 2023 Link Dupont - 4.16.2-1 - Initial package