mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 07:28:01 -05:00
* Update `xclock` `twm` `xterm` `powershell` * Update `skype` and `screenfetch` Fixes #4564 * Removed /dev/null * New Package: bash * Use https and mirror * Use #{CREW_OPTIONS} * Update xterm.rb * Add `bash` to `buildessential` as a dependency * Replace system default bash * Update `mpfr` * #{CREW_VERSION} don't work on cloudready * Update bash.rb * Update `wine` * Update mc * Update opera.rb * Update nano.rb * Update gsettings_desktop_schemas.rb * Update gsettings_desktop_schemas.rb, use meson * Fix syntax error * Add dependencies to `wine` * Remove bash from buildessential.rb * Update screenfetch.rb * Update powershell.rb * Update mpfr.rb * Remove dependencies duplicate with core packages * Update twm, use #{CREW_OPTIONS} * Update xclock, use #{CREW_OPTIONS} * Add --prefix * Add ffmpeg dependency * Delete mpfr.rb * Left mpfr.rb untouch * Add #{CREW_OPTIONS}, tested on x86_64 * Update Opera * fix CREW_OPTIONS * Update wine.rb * Update bash.rb * Remove core dependencies
54 lines
1.5 KiB
Ruby
54 lines
1.5 KiB
Ruby
require 'package'
|
|
|
|
class Nano < Package
|
|
description 'Nano\'s ANOther editor, an enhanced free Pico clone.'
|
|
homepage 'https://www.nano-editor.org/'
|
|
version '5.3'
|
|
compatibility 'all'
|
|
source_url 'https://www.nano-editor.org/dist/v5/nano-5.3.tar.xz'
|
|
source_sha256 'c5c1cbcf622d9a96b6030d66409ed12b204e8bc01ef5e6554ebbe6fb1d734352'
|
|
|
|
depends_on 'xdg_base'
|
|
|
|
def self.patch
|
|
system "sed -i '/SIGWINCH/d' src/nano.c"
|
|
end
|
|
|
|
def self.build
|
|
system './configure',
|
|
'--enable-utf8',
|
|
"--prefix=#{CREW_PREFIX}"
|
|
system 'make'
|
|
open('nanorc', 'w') { |f|
|
|
f << "set constantshow\n"
|
|
f << "set fill 72\n"
|
|
f << "set historylog\n"
|
|
f << "set multibuffer\n"
|
|
f << "set nowrap\n"
|
|
f << "set positionlog\n"
|
|
f << "set historylog\n"
|
|
f << "set quickblank\n"
|
|
f << "set regexp\n"
|
|
f << "set smooth\n"
|
|
f << "set suspend\n"
|
|
}
|
|
end
|
|
|
|
def self.install
|
|
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install-strip'
|
|
system "install -Dm644 nanorc #{CREW_DEST_HOME}/.nanorc"
|
|
FileUtils.mkdir_p "#{CREW_DEST_HOME}/.local/share"
|
|
FileUtils.ln_sf("#{CREW_PREFIX}/share/nano", "#{CREW_DEST_HOME}/.local/share/")
|
|
end
|
|
|
|
def self.postinstall
|
|
puts
|
|
puts "Personal configuration file is located in $HOME/.nanorc".lightblue
|
|
puts
|
|
puts "To make nano your default editor, execute the following:".lightblue
|
|
puts
|
|
puts "echo 'EDITOR=#{CREW_PREFIX}/bin/nano' >> ~/.bashrc && source ~/.bashrc".lightblue
|
|
puts
|
|
end
|
|
end
|