[10168] | 1 | %define pkg_name xmobar |
---|
[10916] | 2 | %define pkg_version 0.24.3 |
---|
| 3 | %define pkg_release 1%{?_dist_release} |
---|
[10168] | 4 | |
---|
[10916] | 5 | %define ghc_version 8.0.1 |
---|
| 6 | # to fix wrong dependencies in cabal files |
---|
| 7 | # do not use '-' |
---|
| 8 | %define timezoneolson_version 0.1.7 |
---|
[10168] | 9 | |
---|
| 10 | Summary: a minimalistic text based status bar |
---|
| 11 | Summary(ja): テキストを基礎とした最小のステータスバー |
---|
| 12 | Name: %{pkg_name} |
---|
| 13 | Version: %{pkg_version} |
---|
| 14 | Release: %{pkg_release} |
---|
| 15 | |
---|
| 16 | License: BSD3 |
---|
| 17 | Group: User Interface/Desktops |
---|
| 18 | URL: http://hackage.haskell.org |
---|
| 19 | |
---|
| 20 | Source0: %{name}-%{version}.tar.gz |
---|
[10916] | 21 | Source1: packages |
---|
[10168] | 22 | |
---|
[10916] | 23 | # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done |
---|
| 24 | Source11: cereal-0.5.4.0.tar.gz |
---|
| 25 | Source12: hinotify-0.3.9.tar.gz |
---|
| 26 | Source13: libmpd-0.9.0.6.tar.gz |
---|
| 27 | Source14: timezone-series-0.1.6.1.tar.gz |
---|
| 28 | Source15: timezone-olson-0.1.7.tar.gz |
---|
[10168] | 29 | |
---|
[10916] | 30 | # to fix wrong dependencies in cabal files |
---|
| 31 | Source101: timezone-olson.cabal |
---|
[10168] | 32 | |
---|
| 33 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 34 | |
---|
[10916] | 35 | BuildRequires: ghc haskell-platform |
---|
[10168] | 36 | BuildRequires: xmonad-contrib |
---|
| 37 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
| 38 | BuildRequires: xorg-x11-devel |
---|
| 39 | BuildRequires: libXpm-devel |
---|
| 40 | |
---|
| 41 | Requires: xmonad-contrib |
---|
| 42 | Requires: libXpm |
---|
| 43 | |
---|
| 44 | Vendor: Project Vine |
---|
| 45 | Distribution: Vine Linux |
---|
| 46 | Packager: ara_t |
---|
| 47 | |
---|
| 48 | %description |
---|
| 49 | Xmobar is a minimalistic text based status bar. |
---|
| 50 | |
---|
| 51 | Inspired by the Ion3 status bar, it supports similar features, |
---|
| 52 | like dynamic color management, output templates, and extensibility |
---|
| 53 | through plugins. |
---|
| 54 | |
---|
| 55 | %description -l ja |
---|
| 56 | Xmobarはテキストを基礎とした最小のステータスバーです。 |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | %prep |
---|
| 60 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
[10916] | 61 | %{__rm} -rf %{_builddir}/package.conf |
---|
| 62 | %{__rm} -rf ${HOME}/.ghc |
---|
[10168] | 63 | %setup -q |
---|
| 64 | |
---|
| 65 | # Initialise the package db |
---|
| 66 | ghc-pkg init %{_builddir}/package.conf |
---|
| 67 | |
---|
| 68 | %build |
---|
| 69 | PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d |
---|
[10916] | 70 | %{__rm} -rf ${PKG_CONF_DIR} |
---|
[10168] | 71 | %{__mkdir_p} ${PKG_CONF_DIR} |
---|
| 72 | |
---|
| 73 | # install dependent packages |
---|
| 74 | cd %{_builddir} |
---|
[10916] | 75 | for pkg in `cat %{SOURCE1}`; do |
---|
[10168] | 76 | %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz |
---|
| 77 | cd ${pkg} |
---|
[10916] | 78 | # fix wrong dependencies |
---|
| 79 | case ${pkg} in |
---|
| 80 | "timezone-olson-%{timezoneolson_version}") %{__cp} %{SOURCE101} . ;; |
---|
| 81 | *) ;; |
---|
| 82 | esac |
---|
[10168] | 83 | cabal configure \ |
---|
| 84 | --prefix=%{_prefix} \ |
---|
| 85 | --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \ |
---|
| 86 | --libsubdir= \ |
---|
| 87 | --datadir=%{_datadir}/%{name}/${pkg} \ |
---|
| 88 | --datasubdir= \ |
---|
| 89 | --docdir=%{_docdir}/%{name}/${pkg} |
---|
| 90 | |
---|
| 91 | cabal build |
---|
| 92 | cabal haddock |
---|
| 93 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
| 94 | cabal register --inplace |
---|
| 95 | cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf |
---|
| 96 | cd .. |
---|
| 97 | done |
---|
| 98 | |
---|
| 99 | # build xmobar |
---|
| 100 | cd %{_builddir}/%{name}-%{version} |
---|
| 101 | cabal configure \ |
---|
| 102 | --prefix=%{_prefix} \ |
---|
| 103 | --libdir=%{_libdir}/ghc-lib/%{name}-%{version} \ |
---|
| 104 | --libsubdir= \ |
---|
| 105 | --datadir=%{_datadir}/%{name}-%{version} \ |
---|
| 106 | --datasubdir= \ |
---|
[10236] | 107 | --docdir=%{_docdir}/%{name}/%{name}-%{version} \ |
---|
[10168] | 108 | --flags="with_utf8" --flags="with_xft" \ |
---|
| 109 | --flags="with_threaded" --flags="with_inotify" \ |
---|
| 110 | --flags="with_datazone" --flags="with_xpm" |
---|
| 111 | |
---|
| 112 | cabal build |
---|
| 113 | |
---|
| 114 | %install |
---|
| 115 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
| 116 | |
---|
[10236] | 117 | %{__cp} license news.md readme.md \ |
---|
| 118 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version} |
---|
[10168] | 119 | |
---|
| 120 | %clean |
---|
| 121 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 122 | |
---|
| 123 | %post |
---|
| 124 | ghc-pkg recache |
---|
| 125 | |
---|
| 126 | %postun |
---|
| 127 | ghc-pkg recache |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | %files |
---|
| 131 | %defattr(-, root, root) |
---|
| 132 | %{_bindir}/ |
---|
[10236] | 133 | %{_libdir}/ghc-%{ghc_version}/ |
---|
| 134 | %{_libdir}/ghc-lib/ |
---|
| 135 | %{_docdir}/%{name}/ |
---|
[10168] | 136 | |
---|
| 137 | |
---|
| 138 | %changelog |
---|
[10916] | 139 | * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.24.3-1 |
---|
| 140 | - update to 0.24.3 |
---|
| 141 | - build using ghc-8.0.1 |
---|
| 142 | |
---|
[10236] | 143 | * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-6 |
---|
| 144 | - rebuilt |
---|
| 145 | |
---|
[10168] | 146 | * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-5 |
---|
| 147 | - rebuild under xmonad-0.12-3 and xmonad-contrib-0.12-4 |
---|
| 148 | - correct SPEC file |
---|
| 149 | |
---|
| 150 | * Sun Mar 06 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-4 |
---|
| 151 | - correct SPEC file |
---|
| 152 | |
---|
| 153 | * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-3 |
---|
| 154 | - rebuild under xmonad-0.12-2 and xmonad-contrib-0.12-3 |
---|
| 155 | |
---|
| 156 | * Sun Feb 28 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-2 |
---|
| 157 | - add configure option and required libraries |
---|
| 158 | |
---|
| 159 | * Sat Feb 27 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-1 |
---|
| 160 | - new package |
---|