Changing default directory for debhelper while packaging (.deb)
I am trying to turn Spamdyke 4.3.1 (download link) into Debian package (.deb
). This is pretty easy software to build, no crazy dependencies, just libssl-dev
so:
apt-get install build-essential devscripts
debhelper dh-make libssl-dev
and then once you unpack the sources:
cd spamdyke-4.3.1/spamdyke
./configure --exec_prefix=/usr
make
and usual
make install
As I am willing to make the Debian package out of this software, I created all the necessary files in debian/
folder and modified its install
target in spamdyke/Makefile.in
by adding ${DESTDIR}
:
install: spamdyke
cp spamdyke ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}/usr/local/bin/spamdyke
ln -s ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}/usr/local/bin/spamdyke
But my current problem is that the distribution archive keeps all the sources in spamdyke/
folder instead of root folder which is not what dh_*
tools expect to do all the heavy lifting automatically:
drwxr-xr-x 4 vagrant vagrant 4096 Feb 3 10:57 debian
drwxr-xr-x 3 vagrant vagrant 4096 Jan 30 19:43 documentation
drwxr-xr-x 2 vagrant vagrant 4096 Feb 5 21:00 spamdyke
drwxr-xr-x 997 vagrant vagrant 77824 Jan 30 19:43 tests
drwxr-xr-x 2 vagrant vagrant 4096 Jan 20 2012 utils
Unfortunately I am unable to create correct debian/rules
to make all the packaging work. I would love to keep my debian/rules
as simple as possible and frankly I hoped that pointing it to spamdyke
source folder with --builddirectory
option would be sufficient at least for configure and build steps. My current debian/rules
now looks like this:
#!/usr/bin/make -f
export DH_VERBOSE = 1
%:
dh $@ --builddirectory=spamdyke
override_dh_auto_configure:
dh_auto_configure --builddirectory=spamdyke -- --exec_prefix=/usr
override_dh_auto_build:
dh_auto_make --builddirectory=spamdyke
however debuild -b -us -uc
produces pretty empty .deb
package in result, with lintian complaining about empty-binary-package
:
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build spamdyke-4.3.1
dpkg-buildpackage: binary-only upload (no source included)
Now running lintian...
W: spamdyke: new-package-should-close-itp-bug
E: spamdyke: copyright-should-refer-to-common-license-file-for-gpl
W: spamdyke: empty-binary-package
Finished running lintian.
I hope must be missing something obvious here, but at the moment I am unable to find out what to search for. Any hints appreciated. Thanks in advance.
dpkg packaging deb debian autotools
add a comment |
I am trying to turn Spamdyke 4.3.1 (download link) into Debian package (.deb
). This is pretty easy software to build, no crazy dependencies, just libssl-dev
so:
apt-get install build-essential devscripts
debhelper dh-make libssl-dev
and then once you unpack the sources:
cd spamdyke-4.3.1/spamdyke
./configure --exec_prefix=/usr
make
and usual
make install
As I am willing to make the Debian package out of this software, I created all the necessary files in debian/
folder and modified its install
target in spamdyke/Makefile.in
by adding ${DESTDIR}
:
install: spamdyke
cp spamdyke ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}/usr/local/bin/spamdyke
ln -s ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}/usr/local/bin/spamdyke
But my current problem is that the distribution archive keeps all the sources in spamdyke/
folder instead of root folder which is not what dh_*
tools expect to do all the heavy lifting automatically:
drwxr-xr-x 4 vagrant vagrant 4096 Feb 3 10:57 debian
drwxr-xr-x 3 vagrant vagrant 4096 Jan 30 19:43 documentation
drwxr-xr-x 2 vagrant vagrant 4096 Feb 5 21:00 spamdyke
drwxr-xr-x 997 vagrant vagrant 77824 Jan 30 19:43 tests
drwxr-xr-x 2 vagrant vagrant 4096 Jan 20 2012 utils
Unfortunately I am unable to create correct debian/rules
to make all the packaging work. I would love to keep my debian/rules
as simple as possible and frankly I hoped that pointing it to spamdyke
source folder with --builddirectory
option would be sufficient at least for configure and build steps. My current debian/rules
now looks like this:
#!/usr/bin/make -f
export DH_VERBOSE = 1
%:
dh $@ --builddirectory=spamdyke
override_dh_auto_configure:
dh_auto_configure --builddirectory=spamdyke -- --exec_prefix=/usr
override_dh_auto_build:
dh_auto_make --builddirectory=spamdyke
however debuild -b -us -uc
produces pretty empty .deb
package in result, with lintian complaining about empty-binary-package
:
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build spamdyke-4.3.1
dpkg-buildpackage: binary-only upload (no source included)
Now running lintian...
W: spamdyke: new-package-should-close-itp-bug
E: spamdyke: copyright-should-refer-to-common-license-file-for-gpl
W: spamdyke: empty-binary-package
Finished running lintian.
I hope must be missing something obvious here, but at the moment I am unable to find out what to search for. Any hints appreciated. Thanks in advance.
dpkg packaging deb debian autotools
add a comment |
I am trying to turn Spamdyke 4.3.1 (download link) into Debian package (.deb
). This is pretty easy software to build, no crazy dependencies, just libssl-dev
so:
apt-get install build-essential devscripts
debhelper dh-make libssl-dev
and then once you unpack the sources:
cd spamdyke-4.3.1/spamdyke
./configure --exec_prefix=/usr
make
and usual
make install
As I am willing to make the Debian package out of this software, I created all the necessary files in debian/
folder and modified its install
target in spamdyke/Makefile.in
by adding ${DESTDIR}
:
install: spamdyke
cp spamdyke ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}/usr/local/bin/spamdyke
ln -s ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}/usr/local/bin/spamdyke
But my current problem is that the distribution archive keeps all the sources in spamdyke/
folder instead of root folder which is not what dh_*
tools expect to do all the heavy lifting automatically:
drwxr-xr-x 4 vagrant vagrant 4096 Feb 3 10:57 debian
drwxr-xr-x 3 vagrant vagrant 4096 Jan 30 19:43 documentation
drwxr-xr-x 2 vagrant vagrant 4096 Feb 5 21:00 spamdyke
drwxr-xr-x 997 vagrant vagrant 77824 Jan 30 19:43 tests
drwxr-xr-x 2 vagrant vagrant 4096 Jan 20 2012 utils
Unfortunately I am unable to create correct debian/rules
to make all the packaging work. I would love to keep my debian/rules
as simple as possible and frankly I hoped that pointing it to spamdyke
source folder with --builddirectory
option would be sufficient at least for configure and build steps. My current debian/rules
now looks like this:
#!/usr/bin/make -f
export DH_VERBOSE = 1
%:
dh $@ --builddirectory=spamdyke
override_dh_auto_configure:
dh_auto_configure --builddirectory=spamdyke -- --exec_prefix=/usr
override_dh_auto_build:
dh_auto_make --builddirectory=spamdyke
however debuild -b -us -uc
produces pretty empty .deb
package in result, with lintian complaining about empty-binary-package
:
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build spamdyke-4.3.1
dpkg-buildpackage: binary-only upload (no source included)
Now running lintian...
W: spamdyke: new-package-should-close-itp-bug
E: spamdyke: copyright-should-refer-to-common-license-file-for-gpl
W: spamdyke: empty-binary-package
Finished running lintian.
I hope must be missing something obvious here, but at the moment I am unable to find out what to search for. Any hints appreciated. Thanks in advance.
dpkg packaging deb debian autotools
I am trying to turn Spamdyke 4.3.1 (download link) into Debian package (.deb
). This is pretty easy software to build, no crazy dependencies, just libssl-dev
so:
apt-get install build-essential devscripts
debhelper dh-make libssl-dev
and then once you unpack the sources:
cd spamdyke-4.3.1/spamdyke
./configure --exec_prefix=/usr
make
and usual
make install
As I am willing to make the Debian package out of this software, I created all the necessary files in debian/
folder and modified its install
target in spamdyke/Makefile.in
by adding ${DESTDIR}
:
install: spamdyke
cp spamdyke ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}/usr/local/bin/spamdyke
ln -s ${DESTDIR}/usr/local/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}/usr/local/bin/spamdyke
But my current problem is that the distribution archive keeps all the sources in spamdyke/
folder instead of root folder which is not what dh_*
tools expect to do all the heavy lifting automatically:
drwxr-xr-x 4 vagrant vagrant 4096 Feb 3 10:57 debian
drwxr-xr-x 3 vagrant vagrant 4096 Jan 30 19:43 documentation
drwxr-xr-x 2 vagrant vagrant 4096 Feb 5 21:00 spamdyke
drwxr-xr-x 997 vagrant vagrant 77824 Jan 30 19:43 tests
drwxr-xr-x 2 vagrant vagrant 4096 Jan 20 2012 utils
Unfortunately I am unable to create correct debian/rules
to make all the packaging work. I would love to keep my debian/rules
as simple as possible and frankly I hoped that pointing it to spamdyke
source folder with --builddirectory
option would be sufficient at least for configure and build steps. My current debian/rules
now looks like this:
#!/usr/bin/make -f
export DH_VERBOSE = 1
%:
dh $@ --builddirectory=spamdyke
override_dh_auto_configure:
dh_auto_configure --builddirectory=spamdyke -- --exec_prefix=/usr
override_dh_auto_build:
dh_auto_make --builddirectory=spamdyke
however debuild -b -us -uc
produces pretty empty .deb
package in result, with lintian complaining about empty-binary-package
:
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build spamdyke-4.3.1
dpkg-buildpackage: binary-only upload (no source included)
Now running lintian...
W: spamdyke: new-package-should-close-itp-bug
E: spamdyke: copyright-should-refer-to-common-license-file-for-gpl
W: spamdyke: empty-binary-package
Finished running lintian.
I hope must be missing something obvious here, but at the moment I am unable to find out what to search for. Any hints appreciated. Thanks in advance.
dpkg packaging deb debian autotools
dpkg packaging deb debian autotools
edited 5 hours ago
Marcin Orlowski
asked Feb 3 '17 at 11:03
Marcin OrlowskiMarcin Orlowski
12316
12316
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You need to set --sourcedirectory
instead of --builddirectory
on dh $@
call, it will affect all dh_auto_*
. So you may remove those overrides.
BUILD SYSTEM OPTIONS
The following command line options are supported by all of the
dh_auto_* debhelper programs. These programs support a variety
of build systems, and normally
heuristically determine which to use, and how to use them. You
can use these command line options to override the default
behavior. Typically these are passed to
dh(1), which then passes them to all the dh_auto_* programs.
-Ddirectory, --sourcedirectory=directory
Assume that the original package source tree is at the
specified directory rather than the top level directory of
the Debian source package tree.
-B[directory], --builddirectory=[directory]
Enable out of source building and use the specified directory
as the build directory. If directory parameter is omitted, a
default build directory will be chosen.
Source: man debhelper
NOTE:
Avoid using hard-coded paths
Example
/usr/local
, Use instead$prefix
variable. autotools have/usr/local
as default, debhelper reset to/usr
(No need to set manually)
Suggested fixes:
spamdyke/Makefile.in
defineprefix
and change symbolic link target.
prefix := @prefix@
...
install: spamdyke
mkdir -p ${DESTDIR}$(prefix)/bin/
cp spamdyke ${DESTDIR}$(prefix)/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}$(prefix)/bin/spamdyke
ln -s $(prefix)/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}$(prefix)/bin/spamdyke
debian/rules
remove the override
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@ --sourcedirectory=spamdyke
Reference: GNU Coding Standards
1
Thanks for the answer. Indeed--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing oninstall
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
isPREFIX = /usr/local/bin
) which unwraps tocp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?
– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns onlydebian
folder.
– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be.deb
built with binary inside (yes!) - still, symlink made byinstall
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though
– Marcin Orlowski
Apr 23 '17 at 13:23
1
@MarcinOrlowski, agree, the project does not useMakefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer
– user.dz
Apr 23 '17 at 16:54
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
|
show 1 more comment
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f879387%2fchanging-default-directory-for-debhelper-while-packaging-deb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to set --sourcedirectory
instead of --builddirectory
on dh $@
call, it will affect all dh_auto_*
. So you may remove those overrides.
BUILD SYSTEM OPTIONS
The following command line options are supported by all of the
dh_auto_* debhelper programs. These programs support a variety
of build systems, and normally
heuristically determine which to use, and how to use them. You
can use these command line options to override the default
behavior. Typically these are passed to
dh(1), which then passes them to all the dh_auto_* programs.
-Ddirectory, --sourcedirectory=directory
Assume that the original package source tree is at the
specified directory rather than the top level directory of
the Debian source package tree.
-B[directory], --builddirectory=[directory]
Enable out of source building and use the specified directory
as the build directory. If directory parameter is omitted, a
default build directory will be chosen.
Source: man debhelper
NOTE:
Avoid using hard-coded paths
Example
/usr/local
, Use instead$prefix
variable. autotools have/usr/local
as default, debhelper reset to/usr
(No need to set manually)
Suggested fixes:
spamdyke/Makefile.in
defineprefix
and change symbolic link target.
prefix := @prefix@
...
install: spamdyke
mkdir -p ${DESTDIR}$(prefix)/bin/
cp spamdyke ${DESTDIR}$(prefix)/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}$(prefix)/bin/spamdyke
ln -s $(prefix)/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}$(prefix)/bin/spamdyke
debian/rules
remove the override
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@ --sourcedirectory=spamdyke
Reference: GNU Coding Standards
1
Thanks for the answer. Indeed--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing oninstall
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
isPREFIX = /usr/local/bin
) which unwraps tocp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?
– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns onlydebian
folder.
– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be.deb
built with binary inside (yes!) - still, symlink made byinstall
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though
– Marcin Orlowski
Apr 23 '17 at 13:23
1
@MarcinOrlowski, agree, the project does not useMakefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer
– user.dz
Apr 23 '17 at 16:54
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
|
show 1 more comment
You need to set --sourcedirectory
instead of --builddirectory
on dh $@
call, it will affect all dh_auto_*
. So you may remove those overrides.
BUILD SYSTEM OPTIONS
The following command line options are supported by all of the
dh_auto_* debhelper programs. These programs support a variety
of build systems, and normally
heuristically determine which to use, and how to use them. You
can use these command line options to override the default
behavior. Typically these are passed to
dh(1), which then passes them to all the dh_auto_* programs.
-Ddirectory, --sourcedirectory=directory
Assume that the original package source tree is at the
specified directory rather than the top level directory of
the Debian source package tree.
-B[directory], --builddirectory=[directory]
Enable out of source building and use the specified directory
as the build directory. If directory parameter is omitted, a
default build directory will be chosen.
Source: man debhelper
NOTE:
Avoid using hard-coded paths
Example
/usr/local
, Use instead$prefix
variable. autotools have/usr/local
as default, debhelper reset to/usr
(No need to set manually)
Suggested fixes:
spamdyke/Makefile.in
defineprefix
and change symbolic link target.
prefix := @prefix@
...
install: spamdyke
mkdir -p ${DESTDIR}$(prefix)/bin/
cp spamdyke ${DESTDIR}$(prefix)/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}$(prefix)/bin/spamdyke
ln -s $(prefix)/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}$(prefix)/bin/spamdyke
debian/rules
remove the override
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@ --sourcedirectory=spamdyke
Reference: GNU Coding Standards
1
Thanks for the answer. Indeed--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing oninstall
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
isPREFIX = /usr/local/bin
) which unwraps tocp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?
– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns onlydebian
folder.
– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be.deb
built with binary inside (yes!) - still, symlink made byinstall
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though
– Marcin Orlowski
Apr 23 '17 at 13:23
1
@MarcinOrlowski, agree, the project does not useMakefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer
– user.dz
Apr 23 '17 at 16:54
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
|
show 1 more comment
You need to set --sourcedirectory
instead of --builddirectory
on dh $@
call, it will affect all dh_auto_*
. So you may remove those overrides.
BUILD SYSTEM OPTIONS
The following command line options are supported by all of the
dh_auto_* debhelper programs. These programs support a variety
of build systems, and normally
heuristically determine which to use, and how to use them. You
can use these command line options to override the default
behavior. Typically these are passed to
dh(1), which then passes them to all the dh_auto_* programs.
-Ddirectory, --sourcedirectory=directory
Assume that the original package source tree is at the
specified directory rather than the top level directory of
the Debian source package tree.
-B[directory], --builddirectory=[directory]
Enable out of source building and use the specified directory
as the build directory. If directory parameter is omitted, a
default build directory will be chosen.
Source: man debhelper
NOTE:
Avoid using hard-coded paths
Example
/usr/local
, Use instead$prefix
variable. autotools have/usr/local
as default, debhelper reset to/usr
(No need to set manually)
Suggested fixes:
spamdyke/Makefile.in
defineprefix
and change symbolic link target.
prefix := @prefix@
...
install: spamdyke
mkdir -p ${DESTDIR}$(prefix)/bin/
cp spamdyke ${DESTDIR}$(prefix)/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}$(prefix)/bin/spamdyke
ln -s $(prefix)/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}$(prefix)/bin/spamdyke
debian/rules
remove the override
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@ --sourcedirectory=spamdyke
Reference: GNU Coding Standards
You need to set --sourcedirectory
instead of --builddirectory
on dh $@
call, it will affect all dh_auto_*
. So you may remove those overrides.
BUILD SYSTEM OPTIONS
The following command line options are supported by all of the
dh_auto_* debhelper programs. These programs support a variety
of build systems, and normally
heuristically determine which to use, and how to use them. You
can use these command line options to override the default
behavior. Typically these are passed to
dh(1), which then passes them to all the dh_auto_* programs.
-Ddirectory, --sourcedirectory=directory
Assume that the original package source tree is at the
specified directory rather than the top level directory of
the Debian source package tree.
-B[directory], --builddirectory=[directory]
Enable out of source building and use the specified directory
as the build directory. If directory parameter is omitted, a
default build directory will be chosen.
Source: man debhelper
NOTE:
Avoid using hard-coded paths
Example
/usr/local
, Use instead$prefix
variable. autotools have/usr/local
as default, debhelper reset to/usr
(No need to set manually)
Suggested fixes:
spamdyke/Makefile.in
defineprefix
and change symbolic link target.
prefix := @prefix@
...
install: spamdyke
mkdir -p ${DESTDIR}$(prefix)/bin/
cp spamdyke ${DESTDIR}$(prefix)/bin/spamdyke-@PACKAGE_VERSION@
rm -f ${DESTDIR}$(prefix)/bin/spamdyke
ln -s $(prefix)/bin/spamdyke-@PACKAGE_VERSION@ ${DESTDIR}$(prefix)/bin/spamdyke
debian/rules
remove the override
#!/usr/bin/make -f
export DH_VERBOSE=1
%:
dh $@ --sourcedirectory=spamdyke
Reference: GNU Coding Standards
edited Apr 23 '17 at 17:23
answered Apr 22 '17 at 12:52
user.dzuser.dz
34.9k1194177
34.9k1194177
1
Thanks for the answer. Indeed--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing oninstall
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
isPREFIX = /usr/local/bin
) which unwraps tocp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?
– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns onlydebian
folder.
– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be.deb
built with binary inside (yes!) - still, symlink made byinstall
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though
– Marcin Orlowski
Apr 23 '17 at 13:23
1
@MarcinOrlowski, agree, the project does not useMakefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer
– user.dz
Apr 23 '17 at 16:54
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
|
show 1 more comment
1
Thanks for the answer. Indeed--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing oninstall
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
isPREFIX = /usr/local/bin
) which unwraps tocp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?
– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns onlydebian
folder.
– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be.deb
built with binary inside (yes!) - still, symlink made byinstall
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though
– Marcin Orlowski
Apr 23 '17 at 13:23
1
@MarcinOrlowski, agree, the project does not useMakefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer
– user.dz
Apr 23 '17 at 16:54
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
1
1
Thanks for the answer. Indeed
--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing on install
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
is PREFIX = /usr/local/bin
) which unwraps to cp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?– Marcin Orlowski
Apr 23 '17 at 11:45
Thanks for the answer. Indeed
--sourcedirectory
seemed the missing thing, so at least it builds now, but I am now failing on install
target with step ` cp spamdyke ${DESTDIR}${PREFIX}/spamdyke-@PACKAGE_VERSION@` ($PREFIX
is PREFIX = /usr/local/bin
) which unwraps to cp spamdyke /home/vagrant/spamdyke4/spamdyke-4.3.1/debian/spamdyke/usr/local/bin/spamdyke-4.3.1
which does not seem correct. Any further hints?– Marcin Orlowski
Apr 23 '17 at 11:45
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns only
debian
folder.– user.dz
Apr 23 '17 at 12:00
@MarcinOrlowski , Is it possible to share your current working tree , through a git repo or something? At least can try it locally. Packager should never make any changes to the source only through Debian quilt patches or submitting changes upstream. Packager owns only
debian
folder.– user.dz
Apr 23 '17 at 12:00
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be
.deb
built with binary inside (yes!) - still, symlink made by install
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though– Marcin Orlowski
Apr 23 '17 at 13:23
I am aware of flaws of my attempt but my current goal is to make .deb with just the binary. I do not care docs etc - it's for internal purposes. Once I got this done I will try to make it more "by the book". As for repo: github.com/MarcinOrlowski/deb-test - I recreated it from scratch commiting each step separately so you can trace what I do wrong. Funny thing though is that now I can be
.deb
built with binary inside (yes!) - still, symlink made by install
is wrong right now but that's cosmetic I believe, so it seemed if fcked something in meantime too. Please take a look though– Marcin Orlowski
Apr 23 '17 at 13:23
1
1
@MarcinOrlowski, agree, the project does not use
Makefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer– user.dz
Apr 23 '17 at 16:54
@MarcinOrlowski, agree, the project does not use
Makefile.am
so the definition is not insert automatically, but it uses autoreconf ., I just tested it, few min i will update my answer– user.dz
Apr 23 '17 at 16:54
1
1
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
I applied what you suggested and it works perfect, w/o the need of overriding targets. Thanks again for all your efforts and assistance. Really appreciated.
– Marcin Orlowski
Apr 23 '17 at 19:51
|
show 1 more comment
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f879387%2fchanging-default-directory-for-debhelper-while-packaging-deb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown