Postpone the evaluation of macro to installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, folks,

I am trying to build a package for a ruby wrapper. The files will be installed to directories depend on the version of the ruby package and the current host OS, which is the way ruby wants. For example, directory would be /usr/lib/ruby/1.8/i686-linux-gnu/ for ruby-1.8 on RH8.0 and i686, but it will be /usr/lib/ruby/1.6/i386-linux/ for ruby-1.6 on RH7.0 and i386.

I figure out the way to determine these directories by invoking ruby and defined the results as macros. But all these macros are evaluated at the compile time. So, the directories will not work if the ruby versions are different on the building host and the installing host.

I can put my files into a directory independent of the ruby version, and put links to them from the right places in the post install phase. But, the macros are all evaluated when I compile the src package, so the direcotries won't work for the installing host.

My question is whether there is a way to postpone the evaluation of the macros to the installation time? If so, how to achieve this?

Thanks in advance for any input.


Liguo (Leo)



_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux