Check-in [d4a2f64d49]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | IPK generator using Listallers lipkgen, very basic; doesn't take care with relocatability or proper file separation yet. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
d4a2f64d49a02e67ee9d6b86ee341af5 |
| User & Date: | mario 2014-12-17 22:06:20 |
Context
|
2014-12-18
| ||
| 16:36 | Umask 644/755 (mostly redundant for rpm/deb targets though; already contain permission concrete logic) check-in: ebb4cb9a0a user: mario tags: trunk | |
|
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 | |
Changes
Added lib/fpm/package/ipk.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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# encoding: utf-8
# api: fpm
# title: Listaller IPK
# description: generates Listaller packages using lipkgen
# type: package
# category: target
# version: 0.0
# doc: http://listaller.tenstral.net/docs/chap-Listaller-Packaging.html
# depends: bin:lipkgen, erb
#
# Listaller uses .IPK files for cross-distro installations. It's well
# integrated with Freedesktop schemes and distro application managers.
#
# This module just chains to the generation tool currently, and builds
# static / unrelocatable packages. (Proper support would require using
# Listallers relaytool + ligcc when building the app binaries.)
#
require "fpm/package"
require "fpm/util"
require "fileutils"
require "erb"
require "time"
# Build Listaller package
class FPM::Package::IPK < FPM::Package
include ERB::Util
option "--relocatable", :bool, "Assume application was built relocatable."
# Create doap, files list, then package up
def output(output_path)
output_check(output_path)
# pre-generate files list
files = []
::Dir.chdir(staging_path) do
files = ::Dir["**/*"]
end
# set up build path
ipk = "#{staging_path}/ipkinstall"
p ipk
::Dir.mkdir(ipk)
# options file
File.open("#{ipk}/pkoptions", "w") do |f|
f.write template("listaller/pkoptions.erb").result(binding)
end
# write DOAP
File.open("#{ipk}/#{name}.doap", "w") do |f|
f.write template("listaller/doap.erb").result(binding)
end
# file list
File.open("#{ipk}/files-all.list", "w") do |f|
f.write template("listaller/files.erb").result(binding)
end
# stubs
File.open("#{ipk}/build.rules", "w") do |f|
end
File.open("#{ipk}/dependencies.list", "w") do |f|
end
# let the packaging be done
sign = attributes[:deb_sign] ? ["--sign"] : []
::Dir.chdir(staging_path) do
system(
"lipkgen",
"-b",
*sign,
"--verbose",
"--sourcedir=.",
"--outdir=#{build_path}"
)
end
# move file
File.rename(::Dir["#{build_path}/*.ipk"].first, output_path)
end # output
end
|
Added templates/listaller/doap.erb.
> > > > > > > > > > > > > > > > > > > > > > > > > | 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 |
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns="http://usefulinc.com/ns/doap#">
<name><%=h @name %></name>
<homepage rdf:resource="<%=h @url %>" />
<created><%= Time.now.strftime("%Y-%m-%d") %></created>
<shortdesc xml:lang="en">
<%=h (description.split("\n") or ["no description"]).first %>
</shortdesc>
<description xml:lang="en">
<%=h (description.split("\n") or ["", "no details available"])[1,50].join("\n ") %>
</description>
<maintainer>
<foaf:Person>
<foaf:name><%=h @maintainer %></foaf:name>
</foaf:Person>
</maintainer>
<release>
<Version>
<name>stable</name>
<created><%=h Time.now.strftime("%Y-%m-%d") %></created>
<revision><%=h @version %></revision>
</Version>
</release>
<license rdf:resource="data:,<%=h @license %>" />
</Project>
|
Added templates/listaller/files.erb.
> > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# IPK file list for <%= name %>
# very crude, does not separate data files yet
:: %APP%
<%= files.grep(/\.desktop$/).join("\n") %>
:: %INST%
<% files.each do |fn| %><%= fn %>
<% end %>
:: %ICON-16%
# none
:: %ICON-32%
# none
:: %ICON-64%
# none
:: %ICON-128%
# none
# could probably just .grep() for icons here too..?
|
Added templates/listaller/pkoptions.erb.
> > > > | 1 2 3 4 | Version: 1.1 AutoFindDeps: <%= attributes[:ipk_relocatable] ? "true" : "false" %> |