1

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.)

  • 1
    Possible duplicate of create a .deb Package from scripts or binaries – muru Mar 24 '17 at 4:39
  • 1
    @muru No, I dont' think so. 1) I have a archive file that has to be extracted properly 2) I want to make working debian build script equivalent to my rpm .spec file, however that answers dont. – Byoungchan Lee Mar 24 '17 at 5:05
4

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.