1679d0f8760be0d5c2098bd557ae76d07b5d2fc4
[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 Source1001:     nano.manifest
11
12 BuildRequires:  file-devel
13 BuildRequires:  pkgconfig(ncurses)
14
15 %description
16 GNU nano is a small and friendly text editor. It aims to emulate the
17 Pico text editor while also offering a few enhancements.
18
19
20 %prep
21 %setup -q
22 cp %{SOURCE1001} .
23
24 # Remove build time references so build-compare can do its work
25 FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
26 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
27 sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/nano.c
28 sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/nano.c
29
30 %build
31 %configure --disable-rpath --enable-utf8
32 make %{?_smp_mflags}
33
34 %install
35 %make_install
36
37 # Remove doc files from /usr/share/nano (they should be in defaultdocdir)
38 rm -rf %{buildroot}%{_datadir}/nano/man-html/
39 rm -rf %{buildroot}%{_mandir}/fr
40
41 %find_lang %{name} --all-name
42
43 %docs_package
44
45 %lang_package
46
47 %files
48 %manifest %{name}.manifest
49 %license COPYING
50 %defattr(-,root,root,-)
51 %{_bindir}/nano
52 %{_bindir}/rnano
53 %{_datadir}/nano/
54
55
56 %changelog