## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # generated by cabal-rpm-2.3.0 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %global pkg_name simplex-chat %global longver 6.4.3.1 #%%global shortver %(c=%{longver}; echo ${c:0:5}) %global shortver %longver %global pkgver %{pkg_name}-%{shortver} %{?haskell_setup} # testsuite missing deps: QuickCheck aeson ansi-terminal async attoparsec base64-bytestring composition crypton generic-random hspec http-types memory network optparse-applicative random silently simple-logger simplexmq sqlcipher-simple terminal unicode-transforms unliftio uri-bytestring Name: %{pkg_name} Version: %{longver} Release: %{autorelease} Summary: Haskell simplex-chat package License: AGPL-3.0-only URL: https://simplex.chat # Begin cabal-rpm sources: Source0: https://github.com/simplex-chat/%{name}/archive/v%{shortver}/%{pkgver}.tar.gz # End cabal-rpm sources # Fix duplicate record field in export list Patch0: simplex-chat-fix-duplicate-record-field.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-aeson-devel BuildRequires: ghc-ansi-terminal-devel BuildRequires: ghc-async-devel BuildRequires: ghc-attoparsec-devel BuildRequires: ghc-base-devel BuildRequires: ghc-base64-bytestring-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-composition-devel BuildRequires: ghc-constraints-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-crypton-devel BuildRequires: ghc-crypton-x509-devel BuildRequires: ghc-data-default-devel BuildRequires: ghc-direct-sqlcipher-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-email-validate-devel BuildRequires: ghc-exceptions-devel BuildRequires: ghc-file-embed-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-http-types-devel BuildRequires: ghc-http2-devel BuildRequires: ghc-memory-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-network-devel BuildRequires: ghc-network-transport-devel BuildRequires: ghc-optparse-applicative-devel BuildRequires: ghc-process-devel BuildRequires: ghc-random-devel BuildRequires: ghc-record-hasfield-devel BuildRequires: ghc-simple-logger-devel BuildRequires: ghc-simplexmq-devel BuildRequires: ghc-socks-devel BuildRequires: ghc-sqlcipher-simple-devel BuildRequires: ghc-stm-devel BuildRequires: ghc-template-haskell-devel BuildRequires: ghc-terminal-devel BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel BuildRequires: ghc-tls-devel BuildRequires: ghc-unicode-transforms-devel BuildRequires: ghc-unliftio-devel BuildRequires: ghc-unliftio-core-devel BuildRequires: ghc-uri-bytestring-devel BuildRequires: ghc-uuid-devel BuildRequires: ghc-websockets-devel BuildRequires: ghc-zip-devel BuildRequires: ghc-zstd-devel %if %{with ghc_prof} BuildRequires: ghc-aeson-prof BuildRequires: ghc-ansi-terminal-prof BuildRequires: ghc-async-prof BuildRequires: ghc-attoparsec-prof BuildRequires: ghc-base-prof BuildRequires: ghc-base64-bytestring-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-composition-prof BuildRequires: ghc-constraints-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-crypton-prof BuildRequires: ghc-crypton-x509-prof BuildRequires: ghc-data-default-prof BuildRequires: ghc-direct-sqlcipher-prof BuildRequires: ghc-directory-prof BuildRequires: ghc-email-validate-prof BuildRequires: ghc-exceptions-prof BuildRequires: ghc-file-embed-prof BuildRequires: ghc-filepath-prof BuildRequires: ghc-http-types-prof BuildRequires: ghc-http2-prof BuildRequires: ghc-memory-prof BuildRequires: ghc-mtl-prof BuildRequires: ghc-network-prof BuildRequires: ghc-network-transport-prof BuildRequires: ghc-optparse-applicative-prof BuildRequires: ghc-process-prof BuildRequires: ghc-random-prof BuildRequires: ghc-record-hasfield-prof BuildRequires: ghc-simple-logger-prof BuildRequires: ghc-simplexmq-prof BuildRequires: ghc-socks-prof BuildRequires: ghc-sqlcipher-simple-prof BuildRequires: ghc-stm-prof BuildRequires: ghc-template-haskell-prof BuildRequires: ghc-terminal-prof BuildRequires: ghc-text-prof BuildRequires: ghc-time-prof BuildRequires: ghc-tls-prof BuildRequires: ghc-unicode-transforms-prof BuildRequires: ghc-unliftio-prof BuildRequires: ghc-unliftio-core-prof BuildRequires: ghc-uri-bytestring-prof BuildRequires: ghc-uuid-prof BuildRequires: ghc-websockets-prof BuildRequires: ghc-zip-prof BuildRequires: ghc-zstd-prof %endif BuildRequires: help2man # End cabal-rpm deps BuildRequires: bzip2-devel %description Haskell simplex-chat package. %package -n ghc-%{name} Summary: Haskell %{name} library %description -n ghc-%{name} This package provides the Haskell %{name} shared library. %package -n ghc-%{name}-devel Summary: Haskell %{name} library development files Provides: ghc-%{name}-static = %{version}-%{release} Provides: ghc-%{name}-static%{?_isa} = %{version}-%{release} %if %{defined ghc_version} Requires: ghc-compiler = %{ghc_version} %endif Requires: ghc-%{name}%{?_isa} = %{version}-%{release} %description -n ghc-%{name}-devel This package provides the Haskell %{name} library development files. %if %{with haddock} %package -n ghc-%{name}-doc Summary: Haskell %{name} library documentation BuildArch: noarch Requires: ghc-filesystem %description -n ghc-%{name}-doc This package provides the Haskell %{name} library documentation. %endif %if %{with ghc_prof} %package -n ghc-%{name}-prof Summary: Haskell %{name} profiling library Requires: ghc-%{name}-devel%{?_isa} = %{version}-%{release} Supplements: (ghc-%{name}-devel and ghc-prof) %description -n ghc-%{name}-prof This package provides the Haskell %{name} profiling library. %endif %prep # Begin cabal-rpm setup: %autosetup -p1 -n %{pkgver} # End cabal-rpm setup cabal-tweak-dep-ver ansi-terminal '<0.12' '<2.0' cabal-tweak-dep-ver constraints '<0.14' '<0.15' cabal-tweak-dep-ver http2 '<4.3' '<6.0' cabal-tweak-dep-ver network-transport '==0.5.6' '>=0.5.6' cabal-tweak-dep-ver optparse-applicative '<0.17' '<0.19' cabal-tweak-dep-ver tls '<1.10' '<3.0' cabal-tweak-dep-ver tls '>=1.9.0' '>=1.5.7' cabal-tweak-dep-ver process '<1.6.18' '<1.7' %if 0%{?fedora} || 0%{?rhel} > 9 cabal-tweak-dep-ver file-embed '==0.0.15.*' '==0.0.16.*' %endif %if 0%{?fedora} > 42 cabal-tweak-dep-ver bytestring '==0.11.*' '==0.12.*' cabal-tweak-dep-ver crypton '==0.34.*' '==1.0.*' cabal-tweak-dep-ver network '<3.2' '<3.3' cabal-tweak-dep-ver network '==3.1.*' '==3.2.*' cabal-tweak-dep-ver template-haskell '==2.20.*' '==2.21.*' %endif %if 0%{?fedora} > 42 || 0%{?rhel} > 9 cabal-tweak-dep-ver websockets '==0.12.*' '==0.13.*' %endif # Work around to fix compilation error sed -i 's/-Werror=incomplete-patterns//g' simplex-chat.cabal %build # Begin cabal-rpm build: %ghc_lib_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_lib_install set noclobber mkdir -p %{buildroot}%{bash_completions_dir} %{buildroot}%{_bindir}/simplex-bot --bash-completion-script simplex-bot | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/simplex-bot %{buildroot}%{_bindir}/simplex-bot-advanced --bash-completion-script simplex-bot-advanced | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/simplex-bot-advanced %{buildroot}%{_bindir}/simplex-broadcast-bot --bash-completion-script simplex-broadcast-bot | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/simplex-broadcast-bot %{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/%{name} %{buildroot}%{_bindir}/simplex-directory-service --bash-completion-script simplex-directory-service | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/simplex-directory-service mkdir -p %{buildroot}%{_mandir}/man1/ help2man --no-info %{buildroot}%{_bindir}/simplex-bot > %{buildroot}%{_mandir}/man1/simplex-bot.1 help2man --no-info %{buildroot}%{_bindir}/simplex-bot-advanced > %{buildroot}%{_mandir}/man1/simplex-bot-advanced.1 help2man --no-info %{buildroot}%{_bindir}/simplex-broadcast-bot > %{buildroot}%{_mandir}/man1/simplex-broadcast-bot.1 help2man --no-info %{buildroot}%{_bindir}/%{name} > %{buildroot}%{_mandir}/man1/%{name}.1 help2man --no-info %{buildroot}%{_bindir}/simplex-directory-service > %{buildroot}%{_mandir}/man1/simplex-directory-service.1 # End cabal-rpm install %files # Begin cabal-rpm files: %license LICENSE %doc README.md %{_bindir}/simplex-bot %{_bindir}/simplex-bot-advanced %{_bindir}/simplex-broadcast-bot %{_bindir}/%{name} %{_bindir}/simplex-directory-service %{bash_completions_dir}/simplex-bot %{bash_completions_dir}/simplex-bot-advanced %{bash_completions_dir}/simplex-broadcast-bot %{bash_completions_dir}/%{name} %{bash_completions_dir}/simplex-directory-service %{_mandir}/man1/simplex-bot.1* %{_mandir}/man1/simplex-bot-advanced.1* %{_mandir}/man1/simplex-broadcast-bot.1* %{_mandir}/man1/%{name}.1* %{_mandir}/man1/simplex-directory-service.1* # End cabal-rpm files %files -n ghc-%{name} -f ghc-%{name}.files # Begin cabal-rpm files: %license LICENSE # End cabal-rpm files %files -n ghc-%{name}-devel -f ghc-%{name}-devel.files %doc README.md %if %{with haddock} %files -n ghc-%{name}-doc -f ghc-%{name}-doc.files %license LICENSE %endif %if %{with ghc_prof} %files -n ghc-%{name}-prof -f ghc-%{name}-prof.files %endif %changelog ## START: Generated by rpmautospec * Wed Aug 13 2025 Luca Magrone - 6.4.3.1-1 - Initial package ## END: Generated by rpmautospec