As you can imagine, this can get pretty complicated. Finally, you run any setup programs that are necessary, giving them whatever information they require to do their job. You let the computer do it. If it seems like the first choice isn't so bad, consider how many files you'll need to keep track of. On a typical Linux system, it's not unusual to have over 20,000 different files.
Some people think the second alternative is easier.
RPM was made for them. When you consider that computers are very good at keeping track of large amounts of data, the idea of giving your computer the job of riding herd over 20,000 files seems like a good one. And that's exactly what package management software does. A package in the computer sense is very similar to a package in the physical sense. Both are methods of keeping related objects together in the same place.