How to add or workaround a udev rule

I was thinking about the same question. I think this could be done by the install hook, adding the file to /etc/udev/rules.d/. Can someone confirm that this is a proper way?