Sisyphus repository
Last update: 24 september 2022 | SRPMs: 17655 | Visits: 25030679
en ru br
ALT Linux repos
S:5.8-alt1
5.0: 2.0.9-alt2
4.1: 2.0.7-alt1
4.0: 2.0.7-alt1

Group :: Editors
RPM: nano

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# Unpackaged files in buildroot should terminate build
%define _unpackaged_files_terminate_build 1

Name: nano
Version: 2.0.9
Release: alt2

Summary: Pico editor clone with enhancements
License: %gpl3plus/%fdl v1.2+
Group: Editors
Url: http://www.nano-editor.org/
Packager: Artem Zolochevskiy <azol at altlinux.ru>

Source0: %url/dist/v2.0/%name-%version.tar.gz
Source1: %name.desktop

# Gets from Debian package:

# debian.org/debian/pool/main/n/nano/nano_1.9.99pre2-1.diff.gz
# and converted from xpm to png
Source2: %name-16x16.png
Source3: %name-32x32.png
Source4: %name-48x48.png

Source5: nanorc

# You can find this sources here:

# http://gentoo-wiki.com/TIP_Nano_Context_Highlighting
Source6: php.nanorc
Source7: xorg.nanorc
Source8: xml.nanorc
Source9: css.nanorc

# needed for post and preun section

Requires(post): %install_info
Requires(preun): %uninstall_info

BuildRequires(pre): rpm-build-licenses
BuildRequires: libncursesw-devel

%description
GNU nano is a small and friendly text editor.  It aims to emulate the
Pico text editor while also offering a few enhancements.

%prep
%setup

%build
%configure --enable-all
%make_build --silent --no-print-directory

%install
%make_install DESTDIR=%buildroot install --silent --no-print-directory

# install .desktop file

install -pD -m 644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

# install icons

install -pD -m 644 %SOURCE2 %buildroot%_miconsdir/%name.png
install -pD -m 644 %SOURCE3 %buildroot%_niconsdir/%name.png
install -pD -m 644 %SOURCE4 %buildroot%_liconsdir/%name.png

# install config file

install -pD -m 644 %SOURCE5 %buildroot%_sysconfdir/nanorc

# additional files for syntax highlighting

install -pD -m 644 %SOURCE6 %buildroot%_datadir/%name/php.nanorc
install -pD -m 644 %SOURCE7 %buildroot%_datadir/%name/xorg.nanorc
install -pD -m 644 %SOURCE8 %buildroot%_datadir/%name/xml.nanorc
install -pD -m 644 %SOURCE9 %buildroot%_datadir/%name/css.nanorc

# find *.mo files and mans for nano

%find_lang --with-man %name

# find mans for nanorc only

%find_lang --without-mo --append --with-man nanorc --output %name.lang

# compress ChangeLog

gzip ChangeLog

# COPYING and COPYING.DOC as symlinks

ln -sf %_licensedir/GPL-3 COPYING
ln -sf %_licensedir/FDL-1.2 COPYING.DOC

%post
%install_info %name.info

%preun
%uninstall_info %name.info

%files -f %name.lang
%doc -d ABOUT-NLS AUTHORS BUGS COPYING COPYING.DOC ChangeLog.gz NEWS README README.CVS THANKS TODO UPGRADE
%doc doc/faq.html doc/nanorc.sample
%_bindir/%name
%_bindir/r%name
%_datadir/%name/
%_infodir/%name.info.*
%_desktopdir/%name.desktop
%_miconsdir/%name.png
%_niconsdir/%name.png
%_liconsdir/%name.png
%config(noreplace) %_sysconfdir/nanorc

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin