1 |
# tests are disabled due to missing packages |
2 |
%global enable_tests 0 |
3 |
%global module_name emojione |
4 |
|
5 |
Name: nodejs-%{module_name} |
6 |
Version: 2.2.6 |
7 |
Release: %mkrel 4 |
8 |
Summary: EmojiOne is a complete set of emojis designed for the web |
9 |
# Artwork included is in CC-BY-SA license |
10 |
# Non-Artwork files are under MIT license |
11 |
License: MIT and CC-BY-SA |
12 |
Group: System/Libraries |
13 |
URL: https://www.emojione.com |
14 |
Source0: https://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz |
15 |
Patch1: %name-xx-build.patch |
16 |
BuildArch: noarch |
17 |
BuildRequires: nodejs-packaging |
18 |
|
19 |
%if 0%{?enable_tests} |
20 |
BuildRequires: nodejs-grunt-cli |
21 |
BuildRequires: nodejs-grunt-contrib-cssmin |
22 |
BuildRequires: nodejs-grunt-contrib-jshint |
23 |
BuildRequires: nodejs-grunt-contrib-qunit |
24 |
BuildRequires: nodejs-grunt-contrib-sass |
25 |
BuildRequires: nodejs-grunt-contrib-uglify |
26 |
BuildRequires: nodejs-grunt-contrib-watch |
27 |
BuildRequires: nodejs-grunt-imageoptim |
28 |
BuildRequires: nodejs-grunt-jsonlint |
29 |
BuildRequires: nodejs-grunt-spritesmith |
30 |
BuildRequires: nodejs-grunt-svgstore |
31 |
%endif |
32 |
|
33 |
Requires: %{name}-json = %{version}-%{release} |
34 |
|
35 |
%description |
36 |
EmojiOne is a complete set of emojis designed for the web. It includes |
37 |
libraries to easily convert unicode characters to shortnames (:smile:) |
38 |
and shortnames to our custom emoji images. PNG and SVG formats provided |
39 |
for the emoji images. |
40 |
|
41 |
|
42 |
%package json |
43 |
Summary: EmojiOne utility for Json files |
44 |
|
45 |
%description json |
46 |
This utility provides Json files which can be utilized by other packages. |
47 |
|
48 |
|
49 |
%package android |
50 |
Summary: EmojiOne utility for Android |
51 |
Requires: %{name} = %{version}-%{release} |
52 |
|
53 |
%description android |
54 |
This utility provides a method to convert from shortname to unicode characters. |
55 |
|
56 |
|
57 |
%package awesome |
58 |
Summary: Emojione awesome |
59 |
Requires: %{name} = %{version}-%{release} |
60 |
|
61 |
%description awesome |
62 |
EmojiOne Awesome is for front end developers who just wanna drop an emoji on a |
63 |
page without using any sorts of scripts. |
64 |
|
65 |
|
66 |
%package meteor |
67 |
Summary: EmojiOne utility for Meteor |
68 |
Requires: %{name} = %{version}-%{release} |
69 |
|
70 |
%description meteor |
71 |
This utility provides a method to convert from shortname to unicode characters. |
72 |
|
73 |
|
74 |
%package ios |
75 |
Summary: EmojiOne utility for iOS |
76 |
Requires: %{name} = %{version}-%{release} |
77 |
|
78 |
%description ios |
79 |
EmojiOne utility is for iOS. |
80 |
|
81 |
%package python |
82 |
Summary: EmojiOne utility for Python |
83 |
Requires: %{name} = %{version}-%{release} |
84 |
|
85 |
%description python |
86 |
EmojiOne utility is for Python. |
87 |
|
88 |
%prep |
89 |
%setup -q -c %{name}-%{version} |
90 |
%patch1 -p0 -b .build |
91 |
chmod a+x package/lib/python/emojipy/*.py |
92 |
find . -name "*.js" -exec chmod 644 {} \; |
93 |
|
94 |
%build |
95 |
# nothing to build |
96 |
|
97 |
%install |
98 |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name} |
99 |
cp -R package/* %{buildroot}%{nodejs_sitelib}/%{module_name} |
100 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/CONTRIBUTING.md |
101 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/LICENSE.md |
102 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/README.md |
103 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/lib/tests.md |
104 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/lib/android/README.md |
105 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/lib/emojione-awesome/README.md |
106 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/lib/ios/README.md |
107 |
rm %{buildroot}%{nodejs_sitelib}/%{module_name}/lib/python/README.md |
108 |
|
109 |
# https://github.com/Ranks/emojione/issues/295 |
110 |
rm -rf %{buildroot}%{nodejs_sitelib}/%{module_name}/assets/fonts |
111 |
|
112 |
%nodejs_symlink_deps |
113 |
|
114 |
%if 0%{?enable_tests} |
115 |
%check |
116 |
%nodejs_symlink_deps --check |
117 |
%{__nodejs} -e 'require("./")' |
118 |
grunt travis |
119 |
%endif |
120 |
|
121 |
%files |
122 |
%license package/LICENSE.md |
123 |
%doc package/CONTRIBUTING.md package/README.md package/lib/tests.md |
124 |
%dir %{nodejs_sitelib}/%{module_name}/ |
125 |
%dir %{nodejs_sitelib}/%{module_name}/lib |
126 |
%{nodejs_sitelib}/%{module_name}/lib/js |
127 |
%{nodejs_sitelib}/%{module_name}/*.js |
128 |
%{nodejs_sitelib}/%{module_name}/bower.json |
129 |
%{nodejs_sitelib}/%{module_name}/package.json |
130 |
%{nodejs_sitelib}/%{module_name}/assets |
131 |
|
132 |
%files json |
133 |
%license package/LICENSE.md |
134 |
%{nodejs_sitelib}/%{module_name}/emoji*.json |
135 |
|
136 |
%files android |
137 |
%doc package/lib/android/README.md |
138 |
%{nodejs_sitelib}/%{module_name}/lib/android |
139 |
|
140 |
%files awesome |
141 |
%doc package/lib/emojione-awesome/README.md |
142 |
%{nodejs_sitelib}/%{module_name}/lib/emojione-awesome |
143 |
|
144 |
%files meteor |
145 |
%{nodejs_sitelib}/%{module_name}/lib/meteor |
146 |
|
147 |
%files ios |
148 |
%doc package/lib/ios/README.md |
149 |
%{nodejs_sitelib}/%{module_name}/lib/ios |
150 |
|
151 |
%files python |
152 |
%doc package/lib/python/README.md |
153 |
%{nodejs_sitelib}/%{module_name}/lib/python |