Skip to content

Debian package build is non-straight forward #355

@adriangibanelbtactic

Description

@adriangibanelbtactic

1 ) In order to build a Debian package you need to install first its dependencies.
I understand that I cannot install an specific 'npm pkg' package from Debian repos because it's nowhere to be found.

2 ) However I find concerning not having an standard way of installing Debian source packages which are needed.

3 ) In a regular Debian package you can use apt build-dep packagename for doing so.
If you are working on your own package you can use apt build-dep path/to/package/source/directory although I don't seem to find that usage documented anywhere.

In order for apt build-dep to work on your package source directory the package needs to have the Debian package files (debian/ directory) that describe which are the actual source Debian packages.

That's not the case if you clone this repo.

4 ) You need to ensure that the debian dependencies files are built.
However there is not an Makefiletarget that eases that task.

This is where I manually add to Makefile file a custom target so that I can more-or-less automate this task:

deb_dependencies: $(DEB_DEPS)

.

  1. Feedback is appreciated.

As the project does not have a proper README on how this repo is used for building a Debian package there might be an alternative way of achieving what I'm looking for.

Else I don't mind to submit a pull request with that deb_dependencies addition to the Makefile.

Thank you!

My current usage

apt install build-essential m4 npm
npm install -g pkg

cd /root
git clone https://github.com/ONLYOFFICE/document-server-package.git
# Workaround for installing dependencies - BEGIN
cd /root/document-server-package

cat << EOF >> Makefile

deb_dependencies: \$(DEB_DEPS)

EOF

make deb_dependencies
cd /root/document-server-package/deb/build
apt build-dep ./
# Workaround for installing dependencies - END

cd /root/document-server-package
make deb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions