2023-12-07 10:31:58 +11:00

65 lines
1.2 KiB
INI

#
# nxlib
#
# This configuration file configure's, make's and install's nxlib.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: nxlib-v%{nxlib_version}-%{_host}-%{release}
Summary: nxlib is a wrapper library that provides closer compatibility to the Xlib API for Nano-X
Version: %{nxlib_version}
Release: %{release}
URL: http://www.microwindows.org/
#
# nxlib Source
#
%source set nxlib \
--rsb-file=nxlib-%{nxlib_version}.tar.gz \
https://codeload.github.com/alex-sever-h/nxlib/tar.gz/%{nxlib_version}
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
source_dir_nxlib="nxlib"
%source setup nxlib -q -n nxlib
cd ${build_top}
#
# Build the source code.
# The configure should be run in the source dir
#
%build
build_top=$(pwd)
%{build_directory}
mkdir -p ${build_dir}
cd ${build_dir}
cp -r ${build_top}/${source_dir_nxlib}/* .
%{host_build_flags}
%{rtems_makefile_inc}
make -f Makefile.rtems
cd ${build_top}
%install
build_top=$(pwd)
%{__rmdir} $SB_BUILD_ROOT
cd ${build_dir}
mkdir -p $SB_BUILD_ROOT/%{_includedir}/X11
mkdir -p $SB_BUILD_ROOT/%{_libdir}
cp -r X11/*.h $SB_BUILD_ROOT/%{_includedir}/X11
cp libX11.a $SB_BUILD_ROOT/%{_libdir}