update to 0.27; subpackage iwlib

This commit is contained in:
Jens Petersen 2018-07-22 23:43:44 +09:00
parent 21e7c69494
commit 7f3a881810
5 changed files with 80 additions and 57 deletions

2
.gitignore vendored
View File

@ -13,3 +13,5 @@
/xmobar-0.24.1.tar.gz
/xmobar-0.24.3.tar.gz
/xmobar-0.24.5.tar.gz
/xmobar-0.27.tar.gz
/iwlib-0.1.0.tar.gz

View File

@ -1 +1,2 @@
SHA512 (xmobar-0.24.5.tar.gz) = b7f4c8b206640d7d0fc60e326fffdc31f4c00df0ffac86102d40035bc632c808cfa19485073059a9c9a01c45b7a9e0aa2bba8dfa27ce9df79d1247a3a13073d4
SHA512 (iwlib-0.1.0.tar.gz) = a6e6a6f7612d61911540938aa526216ef2b5121008b9ec97de4f1d82fd1655a31bd73cc161ed0b16a4445bd5e256e1cd1206b6a8fb7bc39bf8683ac1c2565f93
SHA512 (xmobar-0.27.tar.gz) = 30c75c83778368ace1816ec4616014ccf28ba08e9161daf137819b2625bbb9b35e834311db776d51524866136196c3c217c7a723416f05b5b199f9f49aa06700

View File

@ -1,43 +0,0 @@
diff -u -r -U5 --no-dereference xmobar-0.24.1/samples/xmobar.config xmobar-0.24.1.fonts/samples/xmobar.config
--- xmobar-0.24.1/samples/xmobar.config 2016-07-28 17:46:52.000000000 -0400
+++ xmobar-0.24.1.fonts/samples/xmobar.config 2016-08-04 21:35:45.540931471 -0400
@@ -1,6 +1,6 @@
-Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+Config { font = "xft:mono-12"
, additionalFonts = []
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
diff -u -r -U5 --no-dereference xmobar-0.24.1/src/Config.hs xmobar-0.24.1.fonts/src/Config.hs
--- xmobar-0.24.1/src/Config.hs 2016-07-28 17:46:52.000000000 -0400
+++ xmobar-0.24.1.fonts/src/Config.hs 2016-08-04 21:35:45.541931473 -0400
@@ -108,11 +108,11 @@
deriving ( Read, Eq )
-- | The default configuration values
defaultConfig :: Config
defaultConfig =
- Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+ Config { font = "xft:mono-12"
, additionalFonts = []
, bgColor = "#000000"
, fgColor = "#BFBFBF"
, alpha = 255
, position = Top
diff -u -r -U5 --no-dereference xmobar-0.24.1/src/XUtil.hsc xmobar-0.24.1.fonts/src/XUtil.hsc
--- xmobar-0.24.1/src/XUtil.hsc 2016-07-28 17:46:52.000000000 -0400
+++ xmobar-0.24.1.fonts/src/XUtil.hsc 2016-08-04 21:35:45.542931475 -0400
@@ -98,11 +98,11 @@
#else
fmap Core $ initCoreFont d s
#endif
miscFixedFont :: String
-miscFixedFont = "-misc-fixed-*-*-*-*-*-*-*-*-*-*-*-*"
+miscFixedFont = "-misc-fixed-*-*-*-*-13-*-*-*-*-*-*-*"
-- | Given a fontname returns the font structure. If the font name is
-- not valid the default font will be loaded and returned.
initCoreFont :: Display -> String -> IO FontStruct
initCoreFont d s = do

32
xmobar-xft-fonts.patch Normal file
View File

@ -0,0 +1,32 @@
--- xmobar-0.27/samples/xmobar.config.fonts 2018-07-12 09:16:27.000000000 +0900
+++ xmobar-0.27/samples/xmobar.config 2018-07-23 00:20:59.630748923 +0900
@@ -1,4 +1,4 @@
-Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+Config { font = "xft:mono-12"
, additionalFonts = []
, borderColor = "black"
, border = TopB
diff -up xmobar-0.27/src/Config.hs.fonts xmobar-0.27/src/Config.hs
--- xmobar-0.27/src/Config.hs.fonts 2018-07-23 00:20:59.630748923 +0900
+++ xmobar-0.27/src/Config.hs 2018-07-23 00:23:47.885897344 +0900
@@ -113,7 +113,7 @@ data Border = NoBorder
-- | The default configuration values
defaultConfig :: Config
defaultConfig =
- Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+ Config { font = "xft:mono-12"
, additionalFonts = []
, wmClass = "xmobar"
, wmName = "xmobar"
diff -up xmobar-0.27/src/XUtil.hsc.fonts xmobar-0.27/src/XUtil.hsc
--- xmobar-0.27/src/XUtil.hsc.fonts 2018-07-12 09:16:27.000000000 +0900
+++ xmobar-0.27/src/XUtil.hsc 2018-07-23 00:20:59.631748929 +0900
@@ -98,7 +98,7 @@ initFont d s =
#endif
miscFixedFont :: String
-miscFixedFont = "-misc-fixed-*-*-*-*-*-*-*-*-*-*-*-*"
+miscFixedFont = "-misc-fixed-*-*-*-*-13-*-*-*-*-*-*-*"
-- | Given a fontname returns the font structure. If the font name is
-- not valid the default font will be loaded and returned.

View File

@ -1,20 +1,28 @@
# generated by cabal-rpm-0.12.1
# generated by cabal-rpm-0.12.5
# https://fedoraproject.org/wiki/Packaging:Haskell
%global iwlib iwlib-0.1.0
%global subpkgs %{iwlib}
%bcond_without tests
Name: xmobar
Version: 0.24.5
Release: 4%{?dist}
Version: 0.27
# can only be reset when all subpkgs bumped
Release: 1%{?dist}
Summary: A minimalistic text-based status bar
License: BSD
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
Source1: xmobar.desktop
Source1: https://hackage.haskell.org/package/%{iwlib}/%{iwlib}.tar.gz
Source10: xmobar.desktop
Patch0: xmobar-0.23.1-flags.patch
Patch1: xmobar-0.24.1-fonts.patch
Patch1: xmobar-xft-fonts.patch
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-rpm-macros-extra
# Begin cabal-rpm deps:
BuildRequires: ghc-HTTP-devel
BuildRequires: ghc-X11-devel
@ -24,10 +32,12 @@ BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-hinotify-devel
#BuildRequires: ghc-iwlib-devel
BuildRequires: ghc-libmpd-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-old-locale-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-parsec-numbers-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-regex-compat-devel
BuildRequires: ghc-stm-devel
@ -38,6 +48,9 @@ BuildRequires: ghc-utf8-string-devel
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: wireless-tools-devel
%if %{with tests}
BuildRequires: ghc-hspec-devel
%endif
# End cabal-rpm deps
BuildRequires: desktop-file-utils
BuildRequires: libXpm-devel
@ -49,36 +62,54 @@ Inspired by the Ion3 status bar, it supports similar features, like dynamic
color management, output templates, and extensibility through plugins.
%global main_version %{version}
%if %{defined ghclibdir}
%ghc_lib_subpackage %{iwlib}
%endif
%global version %{main_version}
%prep
%setup -q
%setup -q -a1
%patch0 -p1 -b .orig
%patch1 -p1 -b .fonts
%build
%ghc_libs_build %{subpkgs}
%ghc_bin_build
cd samples
%{_bindir}/ghc %{!?ghc_without_dynamic:-dynamic} --make xmonadpropwrite.hs
cd -
%install
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE1}
%ghc_libs_install %{subpkgs}
%ghc_bin_install
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
install --mode=0755 -p samples/xmonadpropwrite %{buildroot}%{_bindir}/xmonadpropwrite
%files
%license license
%doc news.md readme.md samples/xmobar.config
%attr(755,root,root) %{_bindir}/%{name}
%attr(755,root,root) %{_bindir}/xmonadpropwrite
%doc changelog.md readme.md
%{_bindir}/%{name}
%{_bindir}/xmonadpropwrite
%{_datadir}/applications/xmobar.desktop
%doc samples/xmobar.config
%changelog
* Sun Jul 22 2018 Jens Petersen <petersen@redhat.com> - 0.27-1
- update to 0.27
- subpackage new iwlib dep
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild