diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 12:55:19 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 12:55:19 -0800 |
commit | 620078dc8d9ca3d05ef3706a035fee6d42da8ab8 (patch) | |
tree | d7e6d1aa6781481fd53243d65a4cf2341cd8cca0 | |
parent | 176336f2dedded583aa8d775e6f97ad25a293aa5 (diff) | |
download | nano-620078dc8d9ca3d05ef3706a035fee6d42da8ab8.tar.gz nano-620078dc8d9ca3d05ef3706a035fee6d42da8ab8.tar.bz2 nano-620078dc8d9ca3d05ef3706a035fee6d42da8ab8.zip |
add packaging
-rw-r--r-- | packaging/nano.spec | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/packaging/nano.spec b/packaging/nano.spec new file mode 100644 index 0000000..553457b --- /dev/null +++ b/packaging/nano.spec @@ -0,0 +1,58 @@ +Name: nano +Version: 2.3.1 +Release: 1 +Summary: Pico Editor Clone with Enhancements + +License: GPL-3.0+ +Url: http://www.nano-editor.org/ +Group: Productivity/Editors/Other +Source0: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildRequires: libfile-devel +BuildRequires: ncurses-devel +Recommends: %{name}-locale = %{version} + +%description +GNU nano is a small and friendly text editor. It aims to emulate the +Pico text editor while also offering a few enhancements. + +%lang_package + +%prep +%setup -q + +# Remove build time references so build-compare can do its work +FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M') +FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') +sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" src/nano.c +sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/nano.c + +%build +%configure --disable-rpath --enable-utf8 +make %{?_smp_mflags} + +%install +%make_install + +# Remove doc files from /usr/share/nano (they should be in defaultdocdir) +rm -rf %{buildroot}%{_datadir}/nano/man-html/ +rm -rf %{buildroot}%{_mandir}/fr + +%find_lang %{name} --all-name + +%post +%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info} + +%preun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info} + +%files +%defattr(-,root,root,-) +%{_bindir}/nano +%{_bindir}/rnano +%{_datadir}/nano/ + +%docs_package + +%changelog |