7c25ac566b1770b65912eaa6bb0e0c81d15c60d0
[platform/upstream/nano.git] / packaging / nano.spec
1 Name:           nano
2 Version:        2.3.1
3 Release:        1
4 Summary:        Pico Editor Clone with Enhancements
5
6 License:        GPL-3.0+
7 Url:            http://www.nano-editor.org/
8 Group:          Productivity/Editors/Other
9 Source0:        %{name}-%{version}.tar.bz2
10
11 BuildRequires:  file-devel
12 BuildRequires:  pkgconfig(ncurses)
13
14 %description
15 GNU nano is a small and friendly text editor. It aims to emulate the
16 Pico text editor while also offering a few enhancements.
17
18
19 %prep
20 %setup -q
21
22 # Remove build time references so build-compare can do its work
23 FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
24 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
25 sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/nano.c
26 sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/nano.c
27
28 %build
29 %configure --disable-rpath --enable-utf8
30 make %{?_smp_mflags}
31
32 %install
33 %make_install
34
35 # Remove doc files from /usr/share/nano (they should be in defaultdocdir)
36 rm -rf %{buildroot}%{_datadir}/nano/man-html/
37 rm -rf %{buildroot}%{_mandir}/fr
38
39 %find_lang %{name} --all-name
40
41 %docs_package
42
43 %lang_package
44
45 %files
46 %defattr(-,root,root,-)
47 %{_bindir}/nano
48 %{_bindir}/rnano
49 %{_datadir}/nano/
50
51
52 %changelog