File ghc-hjsmin.spec of Package ghc-hjsmin

#
# spec file for package ghc-hjsmin
#
# Copyright (c) 2025 SUSE LLC
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

Name:           ghc-hjsmin
Version:        0.2.1
Release:        0
Summary:        Javascript minifier
License:        BSD-3-Clause
Group:          Development/Libraries/Haskell
URL:            https://example.com/ghc-hjsmin
Source0:        hjsmin-%{version}.tar.gz
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-array-devel
BuildRequires:  ghc-base-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-exceptions-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-pretty-devel
BuildRequires:  ghc-process-devel
BuildRequires:  ghc-template-haskell-devel
BuildRequires:  ghc-time-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-utf8-string-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-language-javascript-devel
BuildRequires:  ghc-optparse-applicative-devel
%if %{with ghc_prof}
BuildRequires:  ghc-Cabal-prof
BuildRequires:  ghc-array-prof
BuildRequires:  ghc-base-prof
BuildRequires:  ghc-bytestring-prof
BuildRequires:  ghc-containers-prof
BuildRequires:  ghc-deepseq-prof
BuildRequires:  ghc-directory-prof
BuildRequires:  ghc-exceptions-prof
BuildRequires:  ghc-filepath-prof
BuildRequires:  ghc-pretty-prof
BuildRequires:  ghc-process-prof
BuildRequires:  ghc-template-haskell-prof
BuildRequires:  ghc-time-prof
BuildRequires:  ghc-transformers-prof
BuildRequires:  ghc-utf8-string-prof
BuildRequires:  ghc-text-prof
BuildRequires:  ghc-language-javascript-prof
BuildRequires:  ghc-optparse-applicative-prof
%endif
Requires:       ghc-array
Requires:       ghc-base
Requires:       ghc-bytestring
Requires:       ghc-containers
Requires:       ghc-deepseq
Requires:       ghc-directory
Requires:       ghc-exceptions
Requires:       ghc-filepath
Requires:       ghc-pretty
Requires:       ghc-process
Requires:       ghc-template-haskell
Requires:       ghc-time
Requires:       ghc-transformers
Requires:       ghc-utf8-string
Requires:       ghc-text
Requires:       ghc-language-javascript
Requires:       ghc-optparse-applicative

%description
Hjsmin is a library and program for minifying Javascript code.

%prep
%setup -q -n hjsmin-%{version}

%build
ghc --make -package Cabal -no-user-package-db -dynamic Setup
./Setup configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir=%{compiler}/lib/%{pkgid} --datasubdir=%{pkgid} --libexecsubdir=%{pkgid} --ghc --dynlibdir=%{_libdir}/ghc-%{ghc_version}/lib --global --ghc-options="-fhide-source-paths" -v --enable-library-profiling --enable-shared --htmldir=%{_docdir}/%{compiler}/html/libraries/%{pkgid} --global
./Setup build

%install
%if %{buildroot} != /
rm -rf %{buildroot}
%endif
./Setup install --prefix=%{buildroot}%{_prefix} --install-libdir=%{buildroot}%{_libdir} --docdir=%{buildroot}%{_docdir}/%{name}-%{version} --libsubdir=%{compiler}/lib/%{pkgid} --datasubdir=%{pkgid} --libexecsubdir=%{pkgid} --ghc --dynlibdir=%{buildroot}%{_libdir}/ghc-%{ghc_version}/lib --global
%find_lang %{name}

%files -f %{name}.lang
%_docdir/%{name}-%{version}
%_libdir/ghc-%{ghc_version}/lib/*
%_bindir/hjsmin

%changelog
openSUSE Build Service is sponsored by