Skip to content

Commit 43185aa

Browse files
committed
Add spec file for building RPM packages for Fedora.
1 parent 16e1d57 commit 43185aa

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

emacs-common-arduino-mode.spec

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
%global pkg arduino-mode
2+
%global pkgname Arduino Mode
3+
%global gitcommit 16e1d57
4+
5+
Name: emacs-common-%{pkg}
6+
Version: git1.%{gitcommit}
7+
Release: 1%{?dist}
8+
Summary: Emacs editing mode for Arduino code
9+
10+
Group: Development/Tools
11+
License: GPLv3+
12+
URL: http://github.com/mavit/%{pkg}/
13+
Source0: http://download.github.com/mavit-%{pkg}-%{gitcommit}.tar.gz
14+
15+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16+
BuildArch: noarch
17+
BuildRequires: emacs
18+
BuildRequires: xemacs
19+
Requires: arduino
20+
21+
%description
22+
%{pkgname} is an add-on package for GNU Emacs and XEmacs, providing an
23+
editing mode for the Arduino electronics prototyping platform.
24+
25+
This package contains the files common to both the GNU Emacs and XEmacs
26+
%{pkgname} packages.
27+
28+
%package -n emacs-%{pkg}
29+
Summary: Compiled elisp files to run %{pkgname} under GNU Emacs
30+
Group: Development/Tools
31+
Requires: emacs(bin) >= %{_emacs_version}
32+
Requires: emacs-common-%{pkg} = %{version}-%{release}
33+
34+
%description -n emacs-%{pkg}
35+
This package contains the byte compiled elisp packages to run
36+
%{pkgname} with GNU Emacs.
37+
38+
39+
%package -n emacs-%{pkg}-el
40+
Summary: Elisp source files for %{pkgname} under GNU Emacs
41+
Group: Development/Tools
42+
Requires: emacs-%{pkg} = %{version}-%{release}
43+
44+
%description -n emacs-%{pkg}-el
45+
This package contains the elisp source files for %{pkgname} under GNU
46+
Emacs. You do not need to install this package to run
47+
%{pkgname}. Install the emacs-%{pkg} package to use %{pkgname} with
48+
GNU Emacs.
49+
50+
51+
%package -n xemacs-%{pkg}
52+
Summary: Compiled elisp files to run %{pkgname} under XEmacs
53+
Group: Development/Tools
54+
Requires: xemacs(bin) >= %{_xemacs_version}
55+
Requires: emacs-common-%{pkg} = %{version}-%{release}
56+
57+
%description -n xemacs-%{pkg}
58+
This package contains the byte compiled elisp packages to use %{pkgname}
59+
with XEmacs.
60+
61+
62+
%package -n xemacs-%{pkg}-el
63+
Summary: Elisp source files for %{pkgname} under XEmacs
64+
Group: Development/Tools
65+
Requires: xemacs-%{pkg} = %{version}-%{release}
66+
67+
%description -n xemacs-%{pkg}-el
68+
This package contains the elisp source files for %{pkgname} under
69+
XEmacs. You do not need to install this package to run
70+
%{pkgname}. Install the xemacs-%{pkg} package to use %{pkgname} with
71+
XEmacs.
72+
73+
74+
%prep
75+
%setup -q -n mavit-%{pkg}-%{gitcommit}
76+
77+
%build
78+
%{_emacs_bytecompile} %{pkg}.el
79+
%{_xemacs_bytecompile} %{pkg}.el
80+
81+
%install
82+
rm -rf $RPM_BUILD_ROOT
83+
mkdir -p $RPM_BUILD_ROOT/%{_emacs_sitelispdir}/%{pkg} \
84+
$RPM_BUILD_ROOT/%{_xemacs_sitelispdir}/%{pkg} \
85+
$RPM_BUILD_ROOT/%{_emacs_sitestartdir} \
86+
$RPM_BUILD_ROOT/%{_xemacs_sitestartdir}
87+
cp -a %{pkg}.el %{pkg}.elc $RPM_BUILD_ROOT/%{_emacs_sitelispdir}/%{pkg}/
88+
cp -a %{pkg}.el %{pkg}.elc $RPM_BUILD_ROOT/%{_xemacs_sitelispdir}/%{pkg}/
89+
cp -a %{pkg}-init.el $RPM_BUILD_ROOT/%{_emacs_sitestartdir}/
90+
cp -a %{pkg}-init.el $RPM_BUILD_ROOT/%{_xemacs_sitestartdir}/
91+
92+
%clean
93+
rm -rf $RPM_BUILD_ROOT
94+
95+
96+
%files
97+
%defattr(-,root,root,-)
98+
%doc
99+
100+
101+
%files -n emacs-%{pkg}
102+
%defattr(-,root,root,-)
103+
%{_emacs_sitelispdir}/%{pkg}/*.elc
104+
%{_emacs_sitestartdir}/*.el
105+
%dir %{_emacs_sitelispdir}/%{pkg}
106+
107+
108+
%files -n emacs-%{pkg}-el
109+
%defattr(-,root,root,-)
110+
%{_emacs_sitelispdir}/%{pkg}/*.el
111+
112+
113+
%files -n xemacs-%{pkg}
114+
%defattr(-,root,root,-)
115+
%{_xemacs_sitelispdir}/%{pkg}/*.elc
116+
%{_xemacs_sitestartdir}/*.el
117+
%dir %{_xemacs_sitelispdir}/%{pkg}
118+
119+
120+
%files -n xemacs-%{pkg}-el
121+
%defattr(-,root,root,-)
122+
%{_xemacs_sitelispdir}/%{pkg}/*.el
123+
124+
125+
%changelog
126+
* Tue Sep 7 2010 <rpm@mavit.org.uk> - git1.16e1d57-1
127+
- Initial version.
128+

0 commit comments

Comments
 (0)