I want to create a Debian Package that installs a bunch of Folders to a system but I can't get it working. The Package gets created without any errors and lintian also says it's okay but installing does nothing.
The rules file looks like this:
<#>!/usr/bin/make -f
logs = $(CURDIR)/shell_logs/
DEST1 = /opt/Pacetutor/
build: build-stamp
build-stamp:
dh_testdir
touch build-stam
clean:
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
install: build clean $(logs)
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -m 755 -p $(DEST1) <- this is propably optional or not needed ->
cp -r $(logs) $(DEST1) <- using mv works but thats not what I want. ->
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
1 Answer
I assume you want to distribute a folder like this:
/usr/share/myfolder
First make a new folder for the debian package.
Execute this command in Terminal:
mkdir MyDeb
Now create the debian package's control file:
mkdir MyDeb/DEBIAN
gedit MyDeb/DEBIAN/control
Put necessary information in the control file. For example you can paste something like this:
Package: my-awesome-package
Version: 1.0
Architecture: amd64
Maintainer: Chuck Norris<>
Description: Copies some stuff to the disk
Once done, save the control file.
Now, copy the folder you want to distribute with the debian package including it's directory structure, to the MyPackage folder, so the package folder should look like this:
MyPackage
|
+----DEBIAN/control
|
+----usr/share/myfolder
To make the DEB package, open the Terminal and execute this command:
dpkg -b MyPackage