| 130 | === Repacking old software === |
| 131 | When you create RPM packages for software that you don't build from sources (like some old OS/2 programs that are only available in the binary form), you need to follow a special procedure in order to preserve the sizes and timestamps of the original files (which may be important for their identification in case if someone needs that). |
| 132 | |
| 133 | 1. Add the following to the .spec file (somewhere before the %install section): |
| 134 | {{{ |
| 135 | # disable lxlite compression |
| 136 | %define __os_install_post %{nil} |
| 137 | }}} |
| 138 | 2. Use |
| 139 | {{{ |
| 140 | cp -Rdp <src> <dst> |
| 141 | }}} |
| 142 | in the %install section when you copy files from BUILD to BUILDROOT for getting packed by rpmbuild; the naked cp command will kill the original timestamp (the <dst> file will get the current time). |
| 143 | |