]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: | |
3 | # - some smart way to create symlink when one theme is uninstalled | |
4 | # but other still exists | |
5 | ||
6 | %define src_name enlightenment | |
7 | ||
8 | # /usr/share/enlightenment/data/themes/default.edj must be in both packages | |
9 | %define _duplicate_files_terminate_build 0 | |
10 | ||
11 | Summary: Default Enlightenment themes | |
12 | Summary(pl.UTF-8): Domyślne motywy Enlightenmenta | |
13 | Name: enlightenment-theme-default | |
14 | Version: 0.17.2.1 | |
15 | Release: 1 | |
16 | License: BSD | |
17 | Group: Themes | |
18 | Source0: http://download.enlightenment.org/releases/%{src_name}-%{version}.tar.bz2 | |
19 | # Source0-md5: a0da142a9a44540506149936bfc6e28c | |
20 | URL: http://enlightenment.org/ | |
21 | BuildRequires: edje | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Enlightenment default theme. | |
27 | ||
28 | %description -l pl.UTF-8 | |
29 | Domyślne motywy Enlightenmenta. | |
30 | ||
31 | %package slow_pc | |
32 | Summary: Default Enlightenment theme with small textures | |
33 | Summary(pl.UTF-8): Domyślny motyw Enlightenmenta z małymi teksturami | |
34 | Group: Themes | |
35 | Requires: enlightenment >= %{version} | |
36 | Provides: enlightenment-theme-default = %{version} | |
37 | ||
38 | %description slow_pc | |
39 | Default Enlightenment theme with small textures. | |
40 | ||
41 | %description slow_pc -l pl.UTF-8 | |
42 | Domyślny motyw Enlightenmenta z małymi teksturami. | |
43 | ||
44 | %package fast_pc | |
45 | Summary: Default Enlightenment theme with large textures | |
46 | Summary(pl.UTF-8): Domyślny motyw Enlightenmenta z dużymi teksturami | |
47 | Group: Themes | |
48 | Requires: enlightenment >= %{version} | |
49 | Provides: enlightenment-theme-default = %{version} | |
50 | ||
51 | %description fast_pc | |
52 | Default Enlightenment theme with large textures. | |
53 | ||
54 | %description fast_pc -l pl.UTF-8 | |
55 | Domyślny motyw Enlightenmenta z dużymi teksturami. | |
56 | ||
57 | %prep | |
58 | %setup -q -n %{src_name}-%{version} | |
59 | for DIR in themes; do | |
60 | sed -e 's/@EDJE_DEF@/-DLOWRES_PDA=1 -DMEDIUMRES_PDA=2 -DHIRES_PDA=3 -DSLOW_PC=4 -DMEDIUM_PC=5 -DFAST_PC=6 -DE17_PROFILE=$(PROFILE)/' \ | |
61 | -e 's#@edje_cc@#%{_bindir}/edje_cc#' \ | |
62 | -e 's#$(top_srcdir)/data/#../#' \ | |
63 | -e 's#$(top_builddir)/data/#../#' \ | |
64 | data/$DIR/Makefile.am > data/$DIR/Makefile | |
65 | done | |
66 | ||
67 | %build | |
68 | %{__make} -C data/themes default.edj PROFILE=SLOW_PC | |
69 | mv data/themes/{default.edj,default-slow_pc.edj} | |
70 | %{__make} -C data/themes default.edj PROFILE=FAST_PC | |
71 | mv data/themes/{default.edj,default-fast_pc.edj} | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | install -d $RPM_BUILD_ROOT%{_datadir}/enlightenment/data/themes | |
76 | ||
77 | install data/themes/default-{slow,fast}_pc.edj \ | |
78 | $RPM_BUILD_ROOT%{_datadir}/enlightenment/data/themes/ | |
79 | touch $RPM_BUILD_ROOT%{_datadir}/enlightenment/data/themes/default.edj | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post slow_pc | |
85 | [ -e %{_datadir}/enlightenment/data/themes/default.edj ] || \ | |
86 | ln -sf %{_datadir}/enlightenment/data/themes/{default-slow_pc.edj,default.edj} | |
87 | ||
88 | %post fast_pc | |
89 | [ -e %{_datadir}/enlightenment/data/themes/default.edj ] || \ | |
90 | ln -sf %{_datadir}/enlightenment/data/themes/{default-fast_pc.edj,default.edj} | |
91 | ||
92 | %files slow_pc | |
93 | %defattr(644,root,root,755) | |
94 | %{_datadir}/enlightenment/data/themes/default-slow_pc.edj | |
95 | %ghost %{_datadir}/enlightenment/data/themes/default.edj | |
96 | ||
97 | %files fast_pc | |
98 | %defattr(644,root,root,755) | |
99 | %{_datadir}/enlightenment/data/themes/default-fast_pc.edj | |
100 | %ghost %{_datadir}/enlightenment/data/themes/default.edj |