xmonad-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. %define pkg_name xmonad
  2. %define pkg_version 0.12
  3. %define pkg_release 4%{?_dist_release}
  4. %define ghc_version 7.10.3
  5. Summary: Lightweight X11 window manager written in Haskell
  6. Summary(ja): Haskellで書かれたタイル型ウィンドウマネージャ
  7. Name: %{pkg_name}
  8. Version: %{pkg_version}
  9. Release: %{pkg_release}
  10. License: BSD3
  11. Group: User Interface/Desktops
  12. URL: http://hackage.haskell.org
  13. Source0: %{name}-%{version}.tar.gz
  14. Source1: X11-1.6.1.2.tar.gz
  15. Source2: extensible-exceptions-0.1.1.4.tar.gz
  16. Source3: setlocale-1.0.0.3.tar.gz
  17. Source4: utf8-string-1.0.1.1.tar.gz
  18. Source100: packages
  19. Source200: xmonad.desktop
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. BuildRequires: ghc haskell-platform-base cabal-install
  22. BuildRequires: libffi-devel gmp-devel zlib-devel
  23. BuildRequires: libghc-data-default-class
  24. BuildRequires: libghc-dlist
  25. BuildRequires: libghc-data-default
  26. BuildRequires: xorg-x11-devel
  27. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  28. BuildRequires: hscolour
  29. Requires: ghc
  30. Requires: libghc-data-default
  31. Vendor: Project Vine
  32. Distribution: Vine Linux
  33. Packager: Toshiaki Ara <ara_t@384.jp>
  34. %description
  35. Xmonad is a minimalist tiling window manager for X, written in Haskell.
  36. Windows are managed using automatic layout algorithms, which can be dynamically
  37. reconfigured. At any time windows are arranged so as to maximise the use of
  38. screen real estate. All features of the window manager are accessible purely
  39. from the keyboard: a mouse is entirely optional.
  40. Xmonad is configured in Haskell, and custom layout algorithms may be implemented
  41. by the user in config files.
  42. A principle of Xmonad is predictability: the user should know in advance
  43. precisely the window arrangement that will result from any action.
  44. Please sample configure file as follows.
  45. `cp %{_docdir}/%{name}/%{name}-%{version}/xmonad.hs ~/.xmonad/`
  46. %description -l ja
  47. XmonadはHaskellで書かれたタイル型ウィンドウマネージャです。
  48. ウィンドウは自動的レイアウトアルゴリズムによって管理されており、
  49. ウィンドウはいつでも最大化されて配置されます。
  50. 純粋にキーボード操作だけで操作することが可能であり、
  51. マウスの使用は単にオプションです。
  52. XmonadはHaskellで設定され、ユーザーが設定ファイルを書くことで
  53. レイアウトをカスタマイズすることができます。
  54. 設定ファイルの例が
  55. %{_docdir}/%{name}/%{name}-%{version}/xmonad.hs
  56. にあるため、
  57. ~/.xmonad 以下にコピーして使用して下さい。
  58. %prep
  59. %{__rm} -rf ${RPM_BUILD_ROOT}
  60. %setup -q
  61. # Initialise the package db
  62. ghc-pkg init %{_builddir}/package.conf
  63. %build
  64. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  65. %{__mkdir_p} ${PKG_CONF_DIR}
  66. # install dependent packages
  67. cd %{_builddir}
  68. for pkg in `cat %{SOURCE100}`; do
  69. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  70. cd ${pkg}
  71. cabal configure \
  72. --prefix=%{_prefix} \
  73. --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
  74. --libsubdir= \
  75. --datadir=%{_datadir}/%{name}/${pkg} \
  76. --datasubdir= \
  77. --docdir=%{_docdir}/%{name}/${pkg}
  78. cabal build
  79. cabal haddock
  80. cabal copy --destdir=${RPM_BUILD_ROOT}
  81. cabal register --inplace
  82. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
  83. cd ..
  84. done
  85. # build xmonad
  86. cd %{_builddir}/%{name}-%{version}
  87. cabal configure \
  88. --prefix=%{_prefix} \
  89. --libdir=%{_libdir}/ghc-lib/%{name}/%{name}-%{version} \
  90. --libsubdir= \
  91. --datadir=%{_datadir}/%{name}/%{name}-%{version} \
  92. --datasubdir= \
  93. --docdir=%{_docdir}/%{name}/%{name}-%{version}
  94. cabal build
  95. cabal haddock
  96. cabal copy --destdir=${RPM_BUILD_ROOT}
  97. cabal register --inplace
  98. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}-%{version}.conf
  99. %install
  100. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}/man/man1
  101. (cd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/%{name}-%{version}/man
  102. %{__mv} xmonad.1 ${RPM_BUILD_ROOT}%{_datadir}/man/man1
  103. %{__mv} xmonad.1.html xmonad.hs \
  104. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version}
  105. )
  106. %{__rm} -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man
  107. # xsession desktop entry
  108. %{__mkdir_p} %{buildroot}%{_datadir}/xsessions/
  109. %{__install} -m 644 %{SOURCE200} ${RPM_BUILD_ROOT}%{_datadir}/xsessions/
  110. %{__cp} CHANGES.md LICENSE README.md STYLE \
  111. ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{name}-%{version}
  112. %clean
  113. %{__rm} -rf ${RPM_BUILD_ROOT}
  114. %post
  115. ghc-pkg recache
  116. %postun
  117. ghc-pkg recache
  118. %files
  119. %defattr(-, root, root)
  120. %{_bindir}/
  121. %{_libdir}/ghc-%{ghc_version}/
  122. %{_libdir}/ghc-lib/
  123. %{_datadir}/xsessions/
  124. %{_docdir}/%{name}
  125. %{_mandir}/man1/
  126. %changelog
  127. * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.12-4
  128. - rebuilt
  129. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.12-3
  130. - correct SPEC file
  131. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.12-2
  132. - rebuild under dependent rpm packages
  133. * Sat Feb 27 2016 Toshiaki Ara <ara_t@384.jp> 0.12-1
  134. - new package