Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ branch:  cross package maker


Check-in [128bbd605a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1:128bbd605ae6ef131ade7aaa8530ae9017bcf8f3
Date: 2014-12-17 22:05:04
User: mario
Comment:Add -u update filter to create inject .desktop files.
Tags And Properties
  • bgcolor=#ecebfd inherited from [4e43f73a18]
  • branch=trunk inherited from [5980cef12a]
  • sym-trunk inherited from [5980cef12a]
Context
2014-12-17
22:06
[d4a2f64d49] IPK generator using Listallers lipkgen, very basic; doesn't take care with relocatability or proper file separation yet. (user: mario, tags: trunk)
22:05
[128bbd605a] Add -u update filter to create inject .desktop files. (user: mario, tags: trunk)
2014-12-16
23:25
[ce5cab9d30] New -u filter to create composer.json summary (for phar modules). (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 %>;