ocaml-camlp4/ocaml-camlp4.spec
张少宁 9bc2e110d9 Add sw_64 support
Signed-off-by: 张少宁 <zhangshaoning@uniontech.com>
(cherry picked from commit 661c1ed8e75dda6c2046a47fd3002d2724903a7e)
2025-02-19 16:56:30 +08:00

106 lines
2.8 KiB
RPMSpec

%ifnarch sw_64
%global native_compiler 1
%else
%global native_compiler 0
%global debug_package %{nil}
%endif
Name: ocaml-camlp4
Version: 4.14.1
Release: 2
Summary: Pre-Processor for OCaml
License: LGPLv2+ with exceptions
URL: https://github.com/ocaml/camlp4
Source0: https://github.com/ocaml/camlp4/archive/4.14+1.tar.gz
BuildRequires: ocaml-ocamlbuild ocaml
Requires: ocaml-runtime
%description
Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, used to parse the
source file and print some results on the standard output.
This package contains runtime files.
%package devel
Summary: Pre-Processor for OCaml
Requires: %{name} = %{version}-%{release}
%description devel
Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, used to parse the
source file and print some results on the standard output.
This package contains runtime files.
%prep
%autosetup -n camlp4-4.14-1 -p1
%build
./configure
unset MAKEFLAGS
%if %{native_compiler}
make all
%else
make byte
%endif
%install
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/camlp4
make install \
BINDIR=$RPM_BUILD_ROOT%{_bindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
PKGDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/camlp4
%files
%doc README.md LICENSE
%dir %{_libdir}/ocaml/camlp4
%{_libdir}/ocaml/camlp4/*.cmi
%{_libdir}/ocaml/camlp4/*.cma
%{_libdir}/ocaml/camlp4/*.cmo
%dir %{_libdir}/ocaml/camlp4/Camlp4Filters
%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmi
%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmo
%dir %{_libdir}/ocaml/camlp4/Camlp4Parsers
%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmo
%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmi
%dir %{_libdir}/ocaml/camlp4/Camlp4Printers
%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmi
%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmo
%dir %{_libdir}/ocaml/camlp4/Camlp4Top
%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmi
%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmo
%files devel
%doc LICENSE
%{_bindir}/camlp4*
%{_bindir}/mkcamlp4
%if %{native_compiler}
%{_libdir}/ocaml/camlp4/*.a
%{_libdir}/ocaml/camlp4/*.cmxa
%{_libdir}/ocaml/camlp4/*.cmx
%{_libdir}/ocaml/camlp4/*.o
%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmx
%{_libdir}/ocaml/camlp4/Camlp4Filters/*.o
%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmx
%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.o
%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmx
%{_libdir}/ocaml/camlp4/Camlp4Printers/*.o
%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmx
%{_libdir}/ocaml/camlp4/Camlp4Top/*.o
%endif
%changelog
* Tue Feb 18 2025 zhangshaoning <zhangshaoning@uniontech.com> - 4.14.1-2
- Add sw_64 support
* Thu Aug 31 2023 xu_ping <707078654@qq.com> -4.14.1-1
- update to 4.14.1
* Thu Jan 20 2022 liyanan <liyanan32@huawei.com> -4.13.1-1
- update to 4.13.1
* Thu Nov 26 2020 yangjian<yangjian79@huawei.com> - 4.07.0-0.1.4
- Package init