hobbyquaker / arcticfox-config

Configuration Tool for Vape Battery Mods with Arcticfox Firmware. :cloud: :wrench: Works on MacOS and Linux.
GNU General Public License v3.0
66 stars 7 forks source link

separate udev file #32

Open magor opened 7 years ago

magor commented 7 years ago

I'm preparing package for arch linux using your debian package, which is pretty easy but for one thing: you are creating udev rule file in postinst script, would it be possible to add it to package as a separate file? There's debhelper for it, which should automatically install such file, if it's placed in debian/*.udev. If you change it so, I could then use the same file in my packaging. It would also make the debian packaging more clean :)

magor commented 7 years ago

see https://github.com/Debian/debhelper/blob/master/dh_installudev

hobbyquaker commented 7 years ago

That postinst is a result of using the electron-builder to create the packages. I would suggest another solution: I just add pacman to the electron-builder config :)

magor commented 7 years ago

Well, it kinda defeats the purpose of PKGBUILD in arch's AUR and I just spend about 2 hours learning how to write it, but if it gets the job done... :D

hobbyquaker commented 7 years ago

I must admit that I don't know Arch, but adding the udev file to the debian directory would be a bit work, just using the electron builder with 1 config for all package types is quite convenient for me... https://github.com/hobbyquaker/arcticfox-config/releases/tag/v1.11.7 includes a build for arch, let me know if that works for you - if not I will rethink this

magor commented 7 years ago

Just downloaded and installed pacman pkg, It seems that udev rule file did not get installed.

magor commented 7 years ago

this is content of .INSTALL file (pacman's equivalent to postinst script):

post_install() {
    :
#!/bin/bash

# Link to the binary
ln -sf '/opt/Arcticfox Config/arcticfox-config' '/usr/local/bin/arcticfox-config'

}
post_remove() {
    :
#!/bin/bash

# Delete the link to the binary
rm -f '/usr/local/bin/arcticfox-config'

}
hobbyquaker commented 7 years ago

Oops, I forgot one line in the config, next build is on the way

magor commented 7 years ago

Ok, tried latest release. Because of how the udev rule file is created, it stays in place after eventual uninstall. Otherwise, It works like a charm now.