#
# spec file for package dj64dev
#

Name: dj64dev
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: 64-bit djgpp-compatible dev suite

Group: Development/Libraries

License: GPLv3+
URL: https://github.com/stsp/dj64dev
VCS: {{{ git_dir_vcs }}}
Source0: {{{ git_dir_archive }}}

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: make
BuildRequires: sed
BuildRequires: bash
BuildRequires: gcc
BuildRequires: binutils
BuildRequires: binutils-x86_64-linux-gnu
BuildRequires: elfutils-libelf-devel
BuildRequires: thunk-gen
BuildRequires: pkgconf-pkg-config
BuildRequires: ctags
BuildRequires: ncurses

%description
dj64 is a 64-bit djgpp-compatible dev suite.
%end

%prep
{{{ git_dir_setup_macro }}}
%end

%build
autoreconf -v -i -I m4
%configure
make %{?_smp_mflags}
%end

%check
%end

%install
make install DESTDIR=%{buildroot}
%end


%package dj64
Summary: dj64 runtime libraries
%description dj64
This package contains runtime libraries for dj64-built programs.
%end

%files dj64
%defattr(-,root,root)
%{_prefix}/i386-pc-dj64/lib64/*.so.*
%{_prefix}/i386-pc-dj64/lib/crt0.elf
%end

%package dj64-devel
Summary: dj64 development tools and headers
Requires: dj64dev-dj64 = {{{ git_dir_version }}}
Requires: gcc
Requires: binutils
Requires: binutils-x86_64-linux-gnu
Requires: pkgconf-pkg-config
Requires: bash
Requires: sed

%description dj64-devel
This package contains tools and headers for building dj64-enabled programs.
%end

%files dj64-devel
%defattr(-,root,root)
%{_prefix}/i386-pc-dj64/include
%{_prefix}/i386-pc-dj64/bin/ncursesw6-config
%{_prefix}/i386-pc-dj64/bin/elfload.com
%{_prefix}/i386-pc-dj64/lib/*.o
%{_prefix}/i386-pc-dj64/lib64/*.so
%{_prefix}/i386-pc-dj64/lib64/libformw.a
%{_prefix}/i386-pc-dj64/lib64/libmenuw.a
%{_prefix}/i386-pc-dj64/lib64/libncursesw.a
%{_prefix}/i386-pc-dj64/lib64/libpanelw.a
%{_prefix}/i386-pc-dj64/share/*
%{_datadir}/pkgconfig/dj64.pc
%{_docdir}/dj64
%end

%package dj64-devel-static
Summary: dj64 static libraries
Requires: dj64dev-dj64-devel = {{{ git_dir_version }}}

%description dj64-devel-static
This package contains static libraries for dj64.
May be needed on non-glibc systems.
%end

%files dj64-devel-static
%defattr(-,root,root)
%{_prefix}/i386-pc-dj64/lib/libc_s.a
%{_prefix}/i386-pc-dj64/lib64/libdj64_s.a
%{_datadir}/pkgconfig/dj64_s.pc
%{_datadir}/pkgconfig/dj64static.pc
%end

%package djdev64
Summary: djdev64 runtime libraries

%description djdev64
This package contains runtime libraries for djdev64-enabled DPMI host.
%end

%files djdev64
%defattr(-,root,root)
%{_libdir}/*.so.*
%end

%package djdev64-devel
Summary: djdev64 development libraries and headers
Requires: dj64dev-djdev64 = {{{ git_dir_version }}}

%description djdev64-devel
This package contains development libraries and headers for
djdev64-enabled DPMI host.
%end

%files djdev64-devel
%defattr(-,root,root)
%{_includedir}/djdev64
%{_libdir}/*.so
%{_datadir}/pkgconfig/djdev64.pc
%{_datadir}/pkgconfig/djstub64.pc
%end

%changelog
{{{ git_dir_changelog }}}
%end
