$ git diff --patch-with-stat --summary 544e7ea427be9b8f977440b00db1f4ac6c3a4c05..8aeb41b42f14e2beed2998c797a09662e97d90f0
check-update.sh | 3 ++-
octave-optim.spec | 27 +++++++++++----------------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/check-update.sh b/check-update.sh
index f9e8127..dfa47d6 100755
--- a/check-update.sh
+++ b/check-update.sh
@@ -1,3 +1,4 @@
#!/bin/sh
-curl https://octave.sourceforge.io/optim/index.html 2>/dev/null | grep -A1 "<dt>Version</dt>" |sed -ne 's,</dd>.*,,;s,.*<dd>,,p'
+package=optim
+curl -L https://gnu-octave.github.io/packages/${package}/ 2>/dev/null |sed -ne "s,.*${package}-,,;s,\.tar.\gz,,p" |head -n1
diff --git a/octave-optim.spec b/octave-optim.spec
index 2803ea1..c121921 100644
--- a/octave-optim.spec
+++ b/octave-optim.spec
@@ -1,21 +1,21 @@
%global octpkg optim
Summary: Non-linear optimization toolkit
-Name: octave-%{octpkg}
+Name: octave-optim
Version: 1.6.2
-Release: 1
-Source0: https://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
+Release: 2
License: GPLv3+ and BSD and Public Domain
Group: Sciences/Mathematics
-Url: https://octave.sourceforge.io/%{octpkg}/
+Url: https://packages.octave.org/optim/
+Source0: https://downloads.sourceforge.net/octave/optim-%{version}.tar.gz
-BuildRequires: octave-devel >= 4.0.0
-BuildRequires: octave-statistics >= 1.4.0
-BuildRequires: octave-struct >= 1.0.12
+BuildRequires: octave-devel >= 4.0.0
+BuildRequires: octave-statistics >= 1.4.0
+BuildRequires: octave-struct >= 1.0.12
Requires: octave(api) = %{octave_api}
-Requires: octave-statistics >= 1.4.0
-Requires: octave-struct >= 1.0.12
+Requires: octave-statistics >= 1.4.0
+Requires: octave-struct >= 1.0.12
Requires(post): octave
Requires(postun): octave
@@ -23,15 +23,13 @@ Requires(postun): octave
%description
Non-linear optimization toolkit.
-This package is part of community Octave-Forge collection.
-
%files
%license COPYING
%doc NEWS
-%dir %{octpkglibdir}
-%{octpkglibdir}/*
%dir %{octpkgdir}
%{octpkgdir}/*
+%dir %{octpkglibdir}
+%{octpkglibdir}/*
%{_metainfodir}/*.metainfo.xml
#---------------------------------------------------------------------------
@@ -39,9 +37,6 @@ This package is part of community Octave-Forge collection.
%prep
%autosetup -p1 -n %{octpkg}-%{version}
-# remove backup files
-#find . -name \*~ -delete
-
%build
%set_build_flags
%octave_pkg_build