forked from bookest/arduino-mode
-
Notifications
You must be signed in to change notification settings - Fork 3
/
emacs-common-arduino-mode.spec
149 lines (106 loc) · 4.08 KB
/
emacs-common-arduino-mode.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
%global pkg arduino-mode
%global pkgname Arduino Mode
%global gitcommit aa051bb
Name: emacs-common-%{pkg}
Version: 0
Release: 0.3.20100907git%{gitcommit}%{?dist}
Summary: Emacs editing mode for Arduino code
Group: Development/Tools
License: GPLv3+
URL: http://github.com/mavit/%{pkg}/
Source0: http://download.github.com/mavit-%{pkg}-%{gitcommit}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: emacs xemacs xemacs-packages-extra
Requires: arduino-mk
%description
%{pkgname} is an add-on package for GNU Emacs and XEmacs, providing an
editing mode for the Arduino electronics prototyping platform.
This package contains the files common to both the GNU Emacs and XEmacs
%{pkgname} packages.
%package -n emacs-%{pkg}
Summary: Compiled elisp files to run %{pkgname} under GNU Emacs
Group: Development/Tools
Requires: emacs(bin) >= %{_emacs_version}
Requires: emacs-common-%{pkg} = %{version}-%{release}
%description -n emacs-%{pkg}
This package contains the byte compiled elisp packages to run
%{pkgname} with GNU Emacs.
%package -n emacs-%{pkg}-el
Summary: Elisp source files for %{pkgname} under GNU Emacs
Group: Development/Tools
Requires: emacs-%{pkg} = %{version}-%{release}
%description -n emacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under GNU
Emacs. You do not need to install this package to run
%{pkgname}. Install the emacs-%{pkg} package to use %{pkgname} with
GNU Emacs.
%package -n xemacs-%{pkg}
Summary: Compiled elisp files to run %{pkgname} under XEmacs
Group: Development/Tools
Requires: xemacs(bin) >= %{_xemacs_version}
Requires: emacs-common-%{pkg} = %{version}-%{release}
%description -n xemacs-%{pkg}
This package contains the byte compiled elisp packages to use %{pkgname}
with XEmacs.
%package -n xemacs-%{pkg}-el
Summary: Elisp source files for %{pkgname} under XEmacs
Group: Development/Tools
Requires: xemacs-%{pkg} = %{version}-%{release}
%description -n xemacs-%{pkg}-el
This package contains the elisp source files for %{pkgname} under
XEmacs. You do not need to install this package to run
%{pkgname}. Install the xemacs-%{pkg} package to use %{pkgname} with
XEmacs.
%prep
%setup -q -n mavit-%{pkg}-%{gitcommit}
%build
%{_emacs_bytecompile} %{pkg}.el
mv %{pkg}.elc %{pkg}.gnu.elc
%{_xemacs_bytecompile} %{pkg}.el
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_emacs_sitelispdir}/%{pkg} \
$RPM_BUILD_ROOT/%{_xemacs_sitelispdir}/%{pkg} \
$RPM_BUILD_ROOT/%{_emacs_sitestartdir} \
$RPM_BUILD_ROOT/%{_xemacs_sitestartdir}
cp -a %{pkg}.el $RPM_BUILD_ROOT/%{_emacs_sitelispdir}/%{pkg}/
cp -a %{pkg}.gnu.elc $RPM_BUILD_ROOT/%{_emacs_sitelispdir}/%{pkg}/%{pkg}.elc
cp -a %{pkg}.el %{pkg}.elc $RPM_BUILD_ROOT/%{_xemacs_sitelispdir}/%{pkg}/
cp -a %{pkg}-init.el $RPM_BUILD_ROOT/%{_emacs_sitestartdir}/
cp -a %{pkg}-init.el $RPM_BUILD_ROOT/%{_xemacs_sitestartdir}/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%files -n emacs-%{pkg}
%defattr(-,root,root,-)
%{_emacs_sitelispdir}/%{pkg}/*.elc
%{_emacs_sitestartdir}/*.el
%dir %{_emacs_sitelispdir}/%{pkg}
%files -n emacs-%{pkg}-el
%defattr(-,root,root,-)
%{_emacs_sitelispdir}/%{pkg}/*.el
%files -n xemacs-%{pkg}
%defattr(-,root,root,-)
%{_xemacs_sitelispdir}/%{pkg}/*.elc
%{_xemacs_sitestartdir}/*.el
%dir %{_xemacs_sitelispdir}/%{pkg}
%files -n xemacs-%{pkg}-el
%defattr(-,root,root,-)
%{_xemacs_sitelispdir}/%{pkg}/*.el
%changelog
* Wed Sep 22 2010 Peter Oliver <[email protected]> - 0-0.3.20100907gitaa051bb
- Add missing BuildRequires of xemacs-packages-extra.
* Thu Sep 9 2010 Peter Oliver <[email protected]> - 0-0.2.20100907gitaa051bb
- Updated version of arduino-mode.
* Tue Sep 7 2010 Peter Oliver <[email protected]> - 0-0.1.20100907git3cc39d9
- Apply package naming guidelines.
* Tue Sep 7 2010 Peter Oliver <[email protected]> - git2.3cc39d9-1
- Updated version of arduino-mode.
- Require arduino-mk.
* Tue Sep 7 2010 Peter Oliver <[email protected]> - git1.16e1d57-2
- Use correct version of compiled code for GNU Emacs.
* Tue Sep 7 2010 Peter Oliver <[email protected]> - git1.16e1d57-1
- Initial version.