Closed alexdpunkt closed 2 years ago
hi alex,
there is no need to create directories {usr/lib/kaifareader/, etc/kaifareader/, lib/systemd/system/}, because this is automatically done by the debian package management within the debian folder (see the .install file). what was the cause for you to adapt this?
meter.json: it was indented to not copy this file to /etc/kaifareader by installation, because one should review the template, create its own file and, then, copy it there, manually. so it cannot happen that the daemon starts with some completely initially wrong configuration.
Hi Stefan, looks like I misunderstood how the package is built. I just cloned this repository and tried to build the deb package by executing the build script, which failed because of the missing directories. What is the normal procedure to get the deb package?
@tirolerstefan how do you build the deb package? The script fails:
pi@zaehler:~/kaifa/dpkg $ chmod +x build_pkg.sh
pi@zaehler:~/kaifa/dpkg $ ./build_pkg.sh
'../../kaifareader.py' -> 'usr/lib/kaifareader/'
cp: reguläre Datei 'usr/lib/kaifareader/' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
'../../meter_template.json' -> 'etc/kaifareader/'
cp: reguläre Datei 'etc/kaifareader/' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
'../../systemd/kaifareader.service' -> 'lib/systemd/system/'
cp: reguläre Datei 'lib/systemd/system/' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
You are right, there is something wrong, I have to take a look, again.
Yes, creating directories before copying files there, seems to be a good idea :-). In my former posting I thought of problems on copying during dh_install script inside the debian package manager, sorry.
Pushed 615d6e1.
It's working now, I close the pull request :)
updated the build script so that the needed directories are created first (otherwise it fails) and meter.json is used instead of meter_template.json.