# Create the rules that create RPM and SRPM files push(@text, qq{ rpm: \$(SPECFILE) \$(DISTVNAME).tar\$(SUFFIX) \t\$(RPM) -bb --clean --rcfile rpmrc \$(SPECFILE) srpm: \$(SPECFILE) \$(DISTVNAME).tar\$(SUFFIX) \t\$(RPM) -bs --clean --rcfile rpmrc \$(SPECFILE) }); # Create the dependancy rules for the methods/XPL files for (sort grep(/\.xpl$/, keys %::PM_FILES)) { s/\.xpl$//; push(@text, "$_.xpl: $_.base $_.help $_.code"); } join("\n", @text); #### rpm: $(SPECFILE) $(DISTVNAME).tar$(SUFFIX) $(RPM) -bb --clean --rcfile rpmrc $(SPECFILE) srpm: $(SPECFILE) $(DISTVNAME).tar$(SUFFIX) $(RPM) -bs --clean --rcfile rpmrc $(SPECFILE) #### sub MY::post_constants { # With this, you can override INSTALLSITELIB when # you call WriteMakefile, or when you run make. # You can also override INSTALL_DB_FILE when you # run make. Assume you've set @list_of_db_files join("\n", 'INSTALL_DB_FILES=\$(INSTALLSITELIB)/db', "DB_FILES=@list_of_db_files"); } sub MY::postamble { my $self = shift; my @text; push(@text, 'install:: install.dbfiles', '', 'install.dbfiles:: $(DB_FILES)', "\t\$(MKPATH) \$(INSTALL_DB_FILES)", "\t\$(CP) \$(DB_FILES) \$(INSTALL_DB_FILES)"); join("\n", @text); }