You are not logged in.
Hello.
I downloaded an rpm version of this lexmark x2600 printer driver. The file is actaully a shell script that extracts and runs an installer...not an actual rpm. The only OS's supported by the driver are openSUSE 11, Ubuntu 8.04 (I guess this includes both the rpm and deb versions' compatibility list), Debian 4, Asus EeePC OS, gOS and Foresight. Anyway, I extracted it all and was taking a look at this files...one is "pacman.lua" and it seems ArchLinux-specific
-- Copyright (C) 2006 - 2008 Rick Helmus (rhelmus_AT_gmail.com)
--
-- This file is part of Nixstaller.
--
-- This program is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free Software
-- Foundation; either version 2 of the License, or (at your option) any later
-- version.
--
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-- PARTICULAR PURPOSE. See the GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along with
-- this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
-- St, Fifth Floor, Boston, MA 02110-1301 USA
local OLDG = _G
module (..., package.seeall)
function getpkgpath()
return "/usr" -- UNDONE?
end
function installedver()
local cmd = check(io.popen(string.format("(pacman -Qi %s | grep Version) 2>/dev/null", pkg.name, pkg.name)))
local ver = cmd:read("*a")
cmd:close()
if not ver or ver == "" then
return nil
end
ver = string.gsub(ver, "Version.*: ", "")
ver = string.gsub(ver, "\n$", "")
return (ver ~= "" and ver) or nil
end
function missingtool()
end
function present()
return os.exitstatus(os.execute("(pacman --version) >/dev/null 2>&1")) == 2
end
function genfilelist(src)
local flist = check(io.open(src .. "/.FILELIST", "w"))
utils.recursivedir(src, function (_, d)
if d == ".FILELIST" then
return
end
check(flist:write(d .. "\n"))
end)
flist:close()
end
function pkgname()
return string.format("%s-%s-%s-%s.pkg.tar.gz", pkg.name, pkg.version, pkg.release, os.arch)
end
function canxdg()
return false
end
function create(src)
local pkgdir = curdir .. "/pac"
pkgbindir = string.format("%s/%s", pkgdir, pkg.bindir)
instfiles = string.format("%s/%s", pkgdir, pkg.getdatadir())
check(os.mkdirrec(pkgdir))
-- Create directory structure
check(os.mkdirrec(instfiles))
check(os.mkdirrec(pkgbindir))
checkmvrec(src .. "/files", instfiles)
checkmvrec(src .. "/bins", pkgbindir)
-- Copy XDG desktop files
copydeskfiles(pkgdir)
genfilelist(pkgdir)
local size = pkgsize(instfiles) + pkgsize(pkgbindir)
-- Generate PKGINFO file
local pkginfo = check(io.open(pkgdir .. "/.PKGINFO", "w"))
check(pkginfo:write(string.format([[
pkgname = %s
pkgver = %s-%s
packager = %s
url = %s
builddate = %s
size = %d
pkgdesc = %s
arch = %s
]], pkg.name, pkg.version, pkg.release, pkg.maintainer, pkg.url, os.date("%a %b %d %H:%M:%S %Y"), size, pkg.summary, os.arch)))
pkginfo:close() -- important, otherwise data may still be buffered and not in the file
-- Create the package
checkcmd(OLDG.install.execute, string.format("cd %s && tar czf %s/%s --owner=root --group=root * .FILELIST .PKGINFO", pkgdir, curdir, pkgname()))
-- Move install files back
checkmvrec(instfiles, src .. "/files")
checkmvrec(pkgbindir, src .. "/bins")
end
function install(src)
-- UNDONE: Pacman 3.1 seems to be able to place locks on other places?
while os.fileexists("/tmp/pacman.lck") do
if gui.choicebox("Another program seems to be using pacman. Please close this program and\
hit continue.", "Continue", "Abort") == 2 then
os.exit(1)
end
end
checkcmd(OLDG.install.executeasroot, string.format("pacman --force --upgrade %s/%s", curdir, pkgname()))
end
function rollback(src)
if instfiles and os.fileexists(instfiles) then
-- Move install files back
checkmvrec(instfiles, src .. "/files")
checkmvrec(pkgbindir, src .. "/bins")
end
end
This would indicate that it supports Arch, it seems, but it fails when I attempt (by running the install.sh). What should I do in this case to get this driver installed? I'm not sure that I can build an Arch package with it...
Last edited by beniro (2009-08-20 16:38:47)
Offline