Check-in [128bbd605a]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add -u update filter to create inject .desktop files. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
128bbd605ae6ef131ade7aaa8530ae90 |
| User & Date: | mario 2014-12-17 22:05:04 |
Context
|
2014-12-17
| ||
| 22:06 | IPK generator using Listallers lipkgen, very basic; doesn't take care with relocatability or proper file separation yet. check-in: d4a2f64d49 user: mario tags: trunk | |
| 22:05 | Add -u update filter to create inject .desktop files. check-in: 128bbd605a user: mario tags: trunk | |
|
2014-12-16
| ||
| 23:25 | New -u filter to create composer.json summary (for phar modules). check-in: ce5cab9d30 user: mario tags: trunk | |
Changes
Added lib/fpm/package/filter_desktop.rb.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#
# api: fpm
# title: .desktop files
# description: Generates a pkg.desktop files
# type: template
# depends: erb
# category: meta
# version: 0.1
#
# Creates a /usr/share/applications/PKGNAME.desktop file if absent.
#
require "fpm/package"
require "fpm/util"
require "fileutils"
require "erb"
# create .desktop file
class FPM::Package::Filter_desktop < FPM::Package
include ERB::Util
def update
dest = "#{staging_path}/usr/share/applications/fpm:#{name}.desktop"
FileUtils.mkdir_p(File.dirname(dest))
p dest
File.open(dest, "w") do |ini|
p ini.write template("desktop.erb").result(binding)
end
end
end
|
Added templates/desktop.erb.
> > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 |
[Desktop Entry]
Name=<%= @name %>
;GenericName=<%= @name %>
Comment=<%= @description.split("\n").first or "" %>
Categories=<%= @category %>
Exec=<%= @name %>
Icon=<%= @name %>
Terminal=false
Type=Application
MimeType=x-scheme-handler/<%= @name %>;
|