2

I know how to package rpm for RHEL, but have little experience of deb packaging.

I'd like to package other OS's library and headers for making cross-compiler, so there won't need any compilation process. However, deb packaging process forces to write some kind of Makefile.

How can I make a deb package for a precompiled files? I won't distribute it except for coworkers, so I dont' need all kind of complex debian packaging rules.

Here is for my rpm .spec file. It is almost trivial..

%define os some-os
%define rootname sysroot-%{os}
%global debug_package %{nil}
Name: sysroot-some-os
License: UNLICENSED
Version: 0.1
Release: 1
Source: sysroot-some-os.tar.bz2
Summary: Sysroot from some os

BuildArch: noarch
BuildRequires: bzip2

%description
Sysroot from some os

%prep
%setup -q -n %{rootname}

%install
mkdir -p ${RPM_BUILD_ROOT}/opt/cross/%{os}/sysroot
cp -r * ${RPM_BUILD_ROOT}/opt/cross/%{os}/sysroot
chmod -R -x ${RPM_BUILD_ROOT}/opt/cross/%{os}/sysroot

%files
/opt/cross/%{os}/sysroot

%changelog
blabla..

EDIT:

maybe one can think debian/install solve this problem, but as you can see, this package has a lot of files and writing every file is not a good idea. (Look at .spec file.)

Byoungchan Lee
  • 181
  • 1
  • 6

1 Answers1

5

Yes, you can create Debian Binary Package directly

All you need is

  1. packagename/DEBIAN/control file, example:

    Package: linuxstatus
    Version: 1.1-1
    Section: base
    Priority: optional
    Architecture: all
    Depends: bash (>= 2.05a-11), textutils (>= 2.0-12), awk, procps (>= \
    1:2.0.7-8), sed (>= 3.02-8), grep (>= 2.4.2-3), coreutils (>= 5.0-5)
    Maintainer: Chr. Clemens Lee <clemens@kclee.de>
    Description: Linux system information
     This script provides a broad overview of different
     system aspects.
    
  2. Your files in same structure of installation in packagename folder

  3. Run cd ..; dpkg-deb --build packagename

Reference: Debian Binary Package Building HOWTO

user.dz
  • 48,105
  • This made a package, but when I installed the package, no files were installed. – fadedbee Apr 02 '19 at 09:07
  • @fadedbee, Could you please create new question and share the building log. – user.dz Apr 02 '19 at 09:53
  • 1
    Thanks for your reply. I succeeded with: https://gist.github.com/stbuehler/4125579 Sorry - it was a keyring package, so I can't really post it publicly. – fadedbee Apr 02 '19 at 13:44