diff --git a/.gitignore b/.gitignore index 771e4d5..a226287 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libinstpatch-1.0.0-svn386.tar.bz2 +/libinstpatch-1.1.6.tar.gz diff --git a/libinstpatch-cmake-fixes.patch b/libinstpatch-cmake-fixes.patch deleted file mode 100644 index e7e30c0..0000000 --- a/libinstpatch-cmake-fixes.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rupN libinstpatch-1.0.0.old/CMakeLists.txt libinstpatch-1.0.0/CMakeLists.txt ---- libinstpatch-1.0.0.old/CMakeLists.txt 2010-11-08 18:12:26.000000000 -0500 -+++ libinstpatch-1.0.0/CMakeLists.txt 2011-08-06 14:40:44.000000000 -0400 -@@ -144,14 +144,14 @@ configure_file ( ${CMAKE_SOURCE_DIR}/lib - if ( UNIX OR MINGW ) - # pkg-config support - set ( prefix "${CMAKE_INSTALL_PREFIX}" ) -- set ( exec_prefix "\${prefix}" ) -+ set ( exec_prefix "${CMAKE_INSTALL_PREFIX}" ) - if (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) - set(LIBINSTPATCH_INSTALL_DIR ${LIB_INSTALL_DIR}${LIB_SUFFIX}) - else (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) - set(LIBINSTPATCH_INSTALL_DIR ${LIB_INSTALL_DIR}) - endif (LIB_INSTALL_DIR STREQUAL ${CMAKE_INSTALL_PREFIX}/lib) -- set ( libdir "\${exec_prefix}/${LIBINSTPATCH_INSTALL_DIR}" ) -- set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" ) -+ set ( libdir "${LIBINSTPATCH_INSTALL_DIR}" ) -+ set ( includedir "${INCLUDE_INSTALL_DIR}" ) - configure_file ( libinstpatch-1.0.pc.in - ${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc IMMEDIATE @ONLY ) - install ( FILES ${CMAKE_BINARY_DIR}/libinstpatch-1.0.pc diff --git a/libinstpatch-snapshot.sh b/libinstpatch-snapshot.sh deleted file mode 100644 index e2db6b2..0000000 --- a/libinstpatch-snapshot.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# $1 - revision number to checkout. -: ${1?"You must either provide desired revision number \"X\" to checkout: `basename $0` X - or fetch the latest revision by: `basename $0` latest"} - -set -e - -tmp=$(mktemp -d) - -trap cleanup EXIT -cleanup() { - set +e - [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" -} - -unset CDPATH -pwd=$(pwd) -name=libinstpatch -version=1.0.0 - -if [[ $1 == "latest" ]] ; then -revision=HEAD -else -revision=$1 -fi - -pushd "$tmp" >/dev/null -echo "Fetching SVN revision: $1" -svn export -r$revision https://swami.svn.sourceforge.net/svnroot/swami/trunk/$name $name-$version |tee $name.stdout -revision=$(cat $name.stdout|grep "Exported revision"|sed 's|[^0-9]*||g') -echo "Fetched SVN revision: $revision" -rm -f $name.stdout - -tar jcf "$pwd"/$name-$version-svn$revision.tar.bz2 $name-$version -echo "Written: $name-$version-svn$revision.tar.bz2" -popd >/dev/null diff --git a/libinstpatch.spec b/libinstpatch.spec index 1b1f4b8..f41c6ca 100644 --- a/libinstpatch.spec +++ b/libinstpatch.spec @@ -1,52 +1,55 @@ +# https://github.com/swami/libinstpatch/issues/34 +# +# Since this has never worked, we do not have %%files entries for the result. +%bcond_with introspection + +# Fails with +# CMake Error: Error required internal CMake variable not set, cmake may not be +# built correctly. +# Missing variable is: +# CMAKE_FIND_LIBRARY_PREFIXES +# +# When/if this is fixed, we will probably want a -doc subpackage. +%bcond_with gtkdoc + Name: libinstpatch -Version: 1.0.0 +Version: 1.1.6 %global api_version 1.0 -%global so_version 0 -Release: 24.20110806svn386%{?dist} +%global so_version 2 +Release: 1%{?dist} Summary: Instrument file software library URL: http://www.swamiproject.org/ # The entire source is LGPLv2 except: # -# GPLv2: -# libinstpatch/IpatchState.{c,h} -# libinstpatch/IpatchStateGroup.{c,h} -# libinstpatch/IpatchStateItem.{c,h} -# libinstpatch/IpatchState_types.{c,h} -# utils/ipatch_convert.c -# # Public Domain: # libinstpatch/md5.{c,h} +# examples/* # -# LGPLv2+: -# python/ipatch.override +License: LGPLv2 and Public Domain +# Additionally, the following unused files are removed in %%prep: # -# However, the Python bindings are not built because they are not compatible -# with Python 3, so the LGPLv2+ license does not apply. -# -# Additionally, build system files that are not compiled or installed into the -# final RPMs are under various free software licenes. -License: LGPLv2 and GPLv2 and Public Domain -# Fetch source via -# sh libinstpatch-snapshot.sh 386 -Source0: libinstpatch-%{version}-svn386.tar.bz2 -# script to download sources and make tarball from svn -Source1: libinstpatch-snapshot.sh -# .pc file fixes. Patch sent upstream via their mailing list -Patch0: libinstpatch-cmake-fixes.patch +# GPLv2: +# utils/ipatch_convert.c +%global forgeurl https://github.com/swami/%{name}/ +Source0: %{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc +BuildRequires: ninja-build BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(sndfile) - -# Would be required for Python bindings, but they do not support Python 3: -# BuildRequires: python3-devel -# BuildRequires: pkgconfig(pygobject-2.0) -# BuildRequires: #{_bindir}/pygobject-codegen-2.0 +%if %{with gtkdoc} +# GTKDOC_ENABLED +BuildRequires: pkgconfig(gtk-doc) +%endif +%if %{with introspection} +# INTROSPECTION_ENABLED +BuildRequires: pkgconfig(gobject-introspection-1.0) +%endif # This is a forked copy: # Changed so as no longer to depend on Colin Plumb's `usual.h' header @@ -67,21 +70,36 @@ patch files into, which can then be edited, converted, compressed and saved. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: glib2-devel -Requires: libsndfile-devel +Requires: glib2-devel%{?_isa} +Requires: libsndfile-devel%{?_isa} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package doc +Summary: Documentation and examples for %{name} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation and examples for +%{name}. + + %prep %autosetup +# Remove example for nonexistent Python bindings +find examples -type f -name '*.py' -print -delete + %build -# Python bindings do not support Python 3. -%cmake -DBUILD_PYTHON_BINDING:BOOL=OFF +%cmake \ + -DGTKDOC_ENABLED:BOOL=%{?with_gtkdoc:ON}%{!?with_gtkdoc:OFF} \ + -DINTROSPECTION_ENABLED:BOOL=\ +%{?with_introspection:ON}%{!?with_introspection:OFF} \ + -GNinja %cmake_build %install @@ -93,21 +111,26 @@ developing applications that use %{name}. %doc ABOUT-NLS %doc AUTHORS %doc ChangeLog -%doc NEWS -%doc README +%doc README.md %doc TODO.tasks %{_libdir}/%{name}-%{api_version}.so.%{so_version} %{_libdir}/%{name}-%{api_version}.so.%{so_version}.* %files devel -%doc examples/create_sf2.c -%{_includedir}/%{name}-%{api_version} +%doc examples +%{_includedir}/%{name}-%{so_version} %{_libdir}/%{name}-%{api_version}.so %{_libdir}/pkgconfig/%{name}-%{api_version}.pc %changelog +* Fri Apr 16 2021 Benjamin A. Beasley - 1.1.6-1 +- New upstream version 1.1.6 with so-version bump from 0 to 2 and altered + include path +- Upstream tarball now comes from GitHub +- Build with ninja backend instead of make + * Fri Apr 16 2021 Benjamin A. Beasley - 1.0.0-24.20110806svn386 - Adjust whitespace and ordering to personal preference - Drop obsolete ldconfig scriptlets diff --git a/sources b/sources index 5a46cee..b8b0319 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e90da59e1d088ff9dbb270a1349cd99 libinstpatch-1.0.0-svn386.tar.bz2 +SHA512 (libinstpatch-1.1.6.tar.gz) = 0e22165fc3c045bbc3ab2e1c090728232ed9142797ddbd067b682b9bcfee93850deb76c23b78f49a776e3d099be25fa029673ce8e4a909b2f48860dcdc55803c