File hfsutils.spec of Package hfsutils

# spec file for package hfsutils
# Copyright (c) 2020 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           hfsutils
Version:        3.2.6
Release:        0
Summary:        Tools Used for the Macintosh's Hierarchical File System
License:        GPL-2.0-or-later
Group:          System/Filesystems
Patch0:         hfsutils-%{version}.dif
Patch1:         hfsutils-%{version}-ia64.dif
Patch2:         hfsutils-%{version}-seek.dif
Patch3:         hfsutils-%{version}-conf.dif
Patch4:         hfsutils-%{version}-errno.dif
Patch5:         hfsutils-exclusive-open.patch
Patch6:         bug1160268-no-common.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

HFS is the Hierarchical File System used on modern Macintosh computers.
With this package, you can read and write Macintosh-formatted media,
such as floppy disks, CD-ROMs, and SCSI hard disks on most UNIX
platforms. You can also format raw media into an HFS volume.

%package -n xhfsutil
Version:        3.2.6
Release:        0
Summary:        Tcl/Tk Front-End for hfsutils
Group:          System/Filesystems
Requires:       hfsutils

%description -n xhfsutil
A Tcl interface for scriptable access to volumes and  Tk-based
front-end for browsing and copying files through a variety of transfer
modes (MacBinary, BinHex, text, etc.) for hfsutils.

%setup -q
%patch5 -p1
%patch6 -p1

autoreconf --force --install
%configure \
	--with-tcl=%{_libdir} \
make %{?_smp_mflags} TKLIBS="-ltk%tcl_version -ltkstub%tcl_version -ltcl%tcl_version -ltclstub%tcl_version"

install -d -m 755 %{buildroot}%{_prefix}/bin
install -d -m 755 %{buildroot}%{_mandir}/man1
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%doc %{_mandir}/man1/hattrib.1.gz
%doc %{_mandir}/man1/hcd.1.gz
%doc %{_mandir}/man1/hcopy.1.gz
%doc %{_mandir}/man1/hdel.1.gz
%doc %{_mandir}/man1/hdir.1.gz
%doc %{_mandir}/man1/hformat.1.gz
%doc %{_mandir}/man1/hls.1.gz
%doc %{_mandir}/man1/hmkdir.1.gz
%doc %{_mandir}/man1/hmount.1.gz
%doc %{_mandir}/man1/hpwd.1.gz
%doc %{_mandir}/man1/hrename.1.gz
%doc %{_mandir}/man1/hrmdir.1.gz
%doc %{_mandir}/man1/humount.1.gz
%doc %{_mandir}/man1/hvol.1.gz
%doc %{_mandir}/man1/hfsutils.1.gz

%files -n xhfsutil
%doc %{_mandir}/man1/hfssh.1.gz
%doc %{_mandir}/man1/hfs.1.gz
%doc %{_mandir}/man1/xhfs.1.gz