How to patch UNITS



Step 1: Get the units tarball

Step 2: Extract the contents

Step 3: Change into the new directory

Step 4: make 2 new directories, then copy into those directories
mkdir a b
cp ./a
cp ./b

Step 5: Check to show they are the same file
diff -U8 a/ b/

Step 6: Modify b/ and change these lines:

$(srcdir)/mkinstalldirs @UDAT@  $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(srcdir)/definitions.units @UDAT@definitions.units
$(INSTALL_DATA) $(srcdir)/currency.units @UDAT@currency.units
$(INSTALL_DATA) $(srcdir)/
To this: Note: Just adding $(DESTDIR) before @UDAT@
$(srcdir)/mkinstalldirs $(DESTDIR)@UDAT@  $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(srcdir)/definitions.units $(DESTDIR)@UDAT@definitions.units
$(INSTALL_DATA) $(srcdir)/currency.units $(DESTDIR)@UDAT@currency.units
$(INSTALL_DATA) $(srcdir)/ $(DESTDIR)

Step 7: Check that they are different and make the patch file
diff -U8 a/ b/
diff -U8 a/ b/ >

Step 8: Copy the file into your ~/rpmbuild/SOURCES/ directory
cp ~/rpmbuild/SOURCES/

Step 9: Add the patch name to your spec file
—————–After Source files——————–

Step 10: Add the patch macro, make sure you place it after the setup -q part of the spec file
%patch0 -p1

Run and the patch should be applied and fix the makefile issue


About oatleywillisa

Computer Networking Student
This entry was posted in SBR600. Bookmark the permalink.

2 Responses to How to patch UNITS

  1. Pingback: Building the Units Package with rpmbuild | Andrew Oatley-Willis

  2. Pingback: favicon with png2ico: Where fun happens!!! « maxam

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s