## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 simplexmq %global longver 6.4.1.0 %global shortver %(c=%{longver}; echo ${c:0:5}) %global pkgver %{pkg_name}-%{shortver} %{?haskell_setup} # testsuite missing deps: HUnit QuickCheck aeson async base64-bytestring crypton crypton-x509 crypton-x509-store crypton-x509-validation file-embed generic-random hashable hspec hspec-core http-client http-types http2 ini iso8601-time main-tester memory network random silently simple-logger sqlcipher-simple timeit unliftio unliftio-core unordered-containers wai wai-app-static warp warp-tls yaml Name: %{pkg_name} Version: %{longver} Release: %autorelease Summary: SimpleXMQ message broker 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 # Support ghc-http2 5+ Patch0: simplexmq-support-http2-5.patch # Support ghc-tls < 1.9 Patch1: simplexmq-tls-1.8.patch # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-aeson-devel BuildRequires: ghc-asn1-encoding-devel BuildRequires: ghc-asn1-types-devel BuildRequires: ghc-async-devel BuildRequires: ghc-attoparsec-devel BuildRequires: ghc-base-devel BuildRequires: ghc-base64-bytestring-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-case-insensitive-devel BuildRequires: ghc-composition-devel BuildRequires: ghc-constraints-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-crypton-devel BuildRequires: ghc-crypton-x509-devel BuildRequires: ghc-crypton-x509-store-devel BuildRequires: ghc-crypton-x509-validation-devel BuildRequires: ghc-cryptostore-devel BuildRequires: ghc-data-default-devel BuildRequires: ghc-direct-sqlcipher-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-file-embed-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-hashable-devel BuildRequires: ghc-hourglass-devel BuildRequires: ghc-http-types-devel BuildRequires: ghc-http2-devel BuildRequires: ghc-ini-devel BuildRequires: ghc-iproute-devel BuildRequires: ghc-iso8601-time-devel BuildRequires: ghc-memory-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-network-devel BuildRequires: ghc-network-info-devel BuildRequires: ghc-network-transport-devel BuildRequires: ghc-network-udp-devel BuildRequires: ghc-optparse-applicative-devel BuildRequires: ghc-process-devel BuildRequires: ghc-random-devel BuildRequires: ghc-scientific-devel BuildRequires: ghc-simple-logger-devel BuildRequires: ghc-socks-devel BuildRequires: ghc-sqlcipher-simple-devel BuildRequires: ghc-stm-devel BuildRequires: ghc-temporary-devel BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel BuildRequires: ghc-time-manager-devel BuildRequires: ghc-tls-devel BuildRequires: ghc-transformers-devel BuildRequires: ghc-unliftio-devel BuildRequires: ghc-unliftio-core-devel BuildRequires: ghc-wai-devel BuildRequires: ghc-wai-app-static-devel BuildRequires: ghc-warp-devel BuildRequires: ghc-warp-tls-devel BuildRequires: ghc-websockets-devel BuildRequires: ghc-yaml-devel BuildRequires: ghc-zstd-devel %if %{with ghc_prof} BuildRequires: ghc-aeson-prof BuildRequires: ghc-asn1-encoding-prof BuildRequires: ghc-asn1-types-prof BuildRequires: ghc-async-prof BuildRequires: ghc-attoparsec-prof BuildRequires: ghc-base-prof BuildRequires: ghc-base64-bytestring-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-case-insensitive-prof BuildRequires: ghc-composition-prof BuildRequires: ghc-constraints-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-crypton-prof BuildRequires: ghc-crypton-x509-prof BuildRequires: ghc-crypton-x509-store-prof BuildRequires: ghc-crypton-x509-validation-prof BuildRequires: ghc-cryptostore-prof BuildRequires: ghc-data-default-prof BuildRequires: ghc-direct-sqlcipher-prof BuildRequires: ghc-directory-prof BuildRequires: ghc-file-embed-prof BuildRequires: ghc-filepath-prof BuildRequires: ghc-hashable-prof BuildRequires: ghc-hourglass-prof BuildRequires: ghc-http-types-prof BuildRequires: ghc-http2-prof BuildRequires: ghc-ini-prof BuildRequires: ghc-iproute-prof BuildRequires: ghc-iso8601-time-prof BuildRequires: ghc-memory-prof BuildRequires: ghc-mtl-prof BuildRequires: ghc-network-prof BuildRequires: ghc-network-info-prof BuildRequires: ghc-network-transport-prof BuildRequires: ghc-network-udp-prof BuildRequires: ghc-optparse-applicative-prof BuildRequires: ghc-process-prof BuildRequires: ghc-random-prof BuildRequires: ghc-scientific-prof BuildRequires: ghc-simple-logger-prof BuildRequires: ghc-socks-prof BuildRequires: ghc-sqlcipher-simple-prof BuildRequires: ghc-stm-prof BuildRequires: ghc-temporary-prof BuildRequires: ghc-text-prof BuildRequires: ghc-time-prof BuildRequires: ghc-time-manager-prof BuildRequires: ghc-tls-prof BuildRequires: ghc-transformers-prof BuildRequires: ghc-unliftio-prof BuildRequires: ghc-unliftio-core-prof BuildRequires: ghc-wai-prof BuildRequires: ghc-wai-app-static-prof BuildRequires: ghc-warp-prof BuildRequires: ghc-warp-tls-prof BuildRequires: ghc-websockets-prof BuildRequires: ghc-yaml-prof BuildRequires: ghc-zstd-prof %endif BuildRequires: openssl-devel BuildRequires: help2man # End cabal-rpm deps BuildRequires: systemd-rpm-macros %description SimpleXMQ is a message broker for managing message queues and sending messages over public network. It consists of SMP server, SMP client library and SMP agent that implement SMP protocol for client-server communication and SMP agent protocol to manage duplex connections via simplex queues on multiple SMP servers. SMP protocol is inspired by Redis serialization protocol, but it is much simpler - it currently has only 10 client commands and 8 server responses. SimpleXMQ is implemented in Haskell - it benefits from robust software transactional memory (STM) and concurrency primitives that Haskell provides. %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} # Begin cabal-rpm deps: Requires: openssl-devel%{?_isa} # End cabal-rpm deps %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 %if 0%{?fedora} < 43 %global apply_patches 0 1 %else %global apply_patches 0 %endif %autosetup -n %{pkgver} -p1 %{apply_patches} # Tweak constraints 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 tls '<1.10' '<3.0' cabal-tweak-dep-ver tls '>=1.9.0' '>=1.5.7' cabal-tweak-dep-ver ini '==0.4.1' '>=0.4.1' cabal-tweak-dep-ver optparse-applicative '<0.17' '<0.19' cabal-tweak-dep-ver warp '==3.3.30' '>=3.3.30' cabal-tweak-dep-ver warp-tls '==3.4.7' '>=3.4.7' %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 scientific '==0.3.7.*' '==0.3.8.*' cabal-tweak-dep-ver time-manager '==0.0.*' '==0.2.*' cabal-tweak-dep-ver websockets '==0.12.*' '==0.13.*' %endif %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}/smp-server --bash-completion-script smp-server | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/smp-server %{buildroot}%{_bindir}/xftp --bash-completion-script xftp | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/xftp %{buildroot}%{_bindir}/xftp-server --bash-completion-script xftp-server | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/xftp-server mkdir -p %{buildroot}%{_mandir}/man1/ help2man --no-info %{buildroot}%{_bindir}/smp-server > %{buildroot}%{_mandir}/man1/smp-server.1 help2man --no-info %{buildroot}%{_bindir}/xftp > %{buildroot}%{_mandir}/man1/xftp.1 help2man --no-info %{buildroot}%{_bindir}/xftp-server > %{buildroot}%{_mandir}/man1/xftp-server.1 # End cabal-rpm install # Install systemd units mkdir -p %{buildroot}%{_unitdir} install -m 0644 scripts/main/smp-server.service %{buildroot}%{_unitdir} install -m 0644 scripts/main/xftp-server.service %{buildroot}%{_unitdir} %post %systemd_post smp-server.service %systemd_post xftp-server.service %preun %systemd_preun smp-server.service %systemd_preun xftp-server.service %postun %systemd_postun_with_restart smp-server.service %systemd_postun_with_restart xftp-server.service %files # Begin cabal-rpm files: %license LICENSE %doc CHANGELOG.md README.md %{_bindir}/smp-server %{_bindir}/xftp %{_bindir}/xftp-server %{bash_completions_dir}/smp-server %{bash_completions_dir}/xftp %{bash_completions_dir}/xftp-server %{_mandir}/man1/smp-server.1* %{_mandir}/man1/xftp.1* %{_mandir}/man1/xftp-server.1* # End cabal-rpm files %{_unitdir}/smp-server.service %{_unitdir}/xftp-server.service %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 CHANGELOG.md 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 * Tue Aug 12 2025 Luca Magrone - 6.4.1.0-2 - Tweak more dependencies on f43+ * Tue Aug 12 2025 Luca Magrone - 6.4.1.0-1 - Initial package ## END: Generated by rpmautospec