# https://docs.fedoraproject.org/en-US/quick-docs/publish-rpm-on-copr # https://rpm-software-management.github.io/rpm/manual/macros.html # https://rpm-packaging-guide.github.io/ %global _owner pgnd %global _build_timestamp %( date +%%Y%%m%%d_%%H%%M%%S --utc ) %global _dist .%{_build_timestamp}.%{_owner}.fc%{fedora} # https://stackoverflow.com/questions/47838041/rpmbuild-how-to-disable-check-buildroot # https://rpm-software-management.github.io/rpm/manual/dependency_generators.html # %%global __spec_install_pre /bin/true # %%global __arch_install_post %%{nil} # %%global __os_install_post %%{nil} %global _disable_source_fetch 0 %global debug_package %{nil} # %%undefine _auto_set_build_flags %global _hardened_build 1 # %%global __brp_mangle_shebangs %%{nil} # %%global __brp_strip %%{nil} # %%global __requires_exclude ^.*/xxx/bin/python.*$ # %%global __requires_exclude_from ^.*/xxx/bin/python.*$ # %%global _build_id_links none # %%bcond_with XXX : opt build with XXX; default, without # %%bcond_without XXX : opt build without XXX; default, with # UNISON # https://github.com/bcpierce00/unison %global _un_name unison %global _un_pkgnm unison %global _un_comment Unison file-synchronization tool %global _un_descrip %{expand: %{_un_comment}.} # https://spdx.org/licenses/GPL-3.0-only.html %global _un_license GPL-3.0-only %global _un_install_dir /usr/local/unison %global _un_c /usr/bin/gcc %global _un_cxx /usr/bin/g++ %global _un_linker /usr/bin/ld.bfd # https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/ # https://github.com/bcpierce00/unison %global _un0_scm_host https://github.com %global _un0_scm_repo bcpierce00/unison %global _un0_scm_branch master %global _un0_scm_url %{_un0_scm_host}/%{_un0_scm_repo} %global _un0_scm_commit %( git ls-remote %{_un0_scm_url} | grep /%{_un0_scm_branch}$ | cut -f1 ) %global _un0_scm_shortcommit %( c=%{_un0_scm_commit}; echo ${c} | head -c 7 ) %global _un0_scm_repo_esc %( echo %{_un0_scm_repo} | sed 's|_|-|g' | sed 's|/|%2F|g') %global _un0_scm_repo_norm %( echo %{_un0_scm_repo} | sed 's|_|-|g' | sed 's|/|-|g' ) %global _un0_scm_branch_norm %( echo %{_un0_scm_branch} | sed 's|_|-|g' | sed 's|/|-|g' ) # GH API: # https://docs.github.com/en/rest/repos/contents %global _un0_scm_host_api https://api.github.com/repos %global _un0_scm_tarball %{_un0_scm_host_api}/%{_un0_scm_repo}/tarball/%{commit0} %global _un0_scm_extract_dir %{_un0_scm_repo_norm}-%{shortcommit0} %global forgeurl0 %{_un0_scm_url} %global commit0 %{_un0_scm_commit} %global shortcommit0 %{_un0_scm_shortcommit} %global forgesource0 %{_un0_scm_tarball} %global extractdir0 %{_un0_scm_extract_dir} %global forgesetupargs0 -T -D -b 0 -n %{extractdir0} %forgemeta -i -a %global dist %{_dist} # Vendor Pinning Vendor: %{_owner} # NEVRA (n-e:v-r.a) Name: %{_un_pkgnm} Epoch: 3 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/ Version: %{scm0}_%( echo %{_un0_scm_branch} | sed 's|-|_|g' ) Release: 0%{?dist} # https://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/ %global _same_evr %{epoch}:%{version}-%{release} Summary: %{_un_comment} License: %{_un_license} URL: %{forgeurl0} Source0: %{forgesource0} BuildRequires: gcc BuildRequires: ghostscript BuildRequires: hevea BuildRequires: lynx BuildRequires: make BuildRequires: ocaml-base64-devel BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-lablgtk3-devel BuildRequires: pkgconf BuildRequires: texlive-latex %description %{_un_descrip} %prep echo '##### STARTING PREP #####' %forgesetup -a %build echo '##### STARTING BUILD #####' make V=1 make V=1 docs %install echo '##### STARTING INSTALL #####' mkdir -p ${RPM_BUILD_ROOT}/%{_un_install_dir} PREFIX="" DESTDIR=${RPM_BUILD_ROOT}/%{_un_install_dir} make install %files %{_un_install_dir} %changelog * Wed Sep 18 2024 pgnd _ - bump 1726687623