From Fedora Project Wiki

Line 27: Line 27:
:: ''type=tar'' caused problem while decompressing the tar ball with pde-script, so we can just archive as a regular folder
:: ''type=tar'' caused problem while decompressing the tar ball with pde-script, so we can just archive as a regular folder
:: It's better to keep the name of the folder as just ''mercurial'' then we will put it in a folder called eclipse-mercurial
:: It's better to keep the name of the folder as just ''mercurial'' then we will put it in a folder called eclipse-mercurial
: so the new command is: <code> hg archive -r RELEASE_1.8.1 ../eclipse-mercurial/mercurial</code>  
: so the new command is: <code> hg archive -r RELEASE_1.8.1 ../eclipse-mercurial-1.8.1/mercurial</code>  
* Create a new '''feature''' in Eclipse using '''New''' -> '''feature'''
* Create a new '''feature''' in Eclipse using '''New''' -> '''feature'''


Line 36: Line 36:
:: Added ''mylyn'' as the dependency later
:: Added ''mylyn'' as the dependency later
* Create an archive file of the feature then add it to the '''SOURCES''' in RPM project.
* Create an archive file of the feature then add it to the '''SOURCES''' in RPM project.
: Before, I put the ''com.vectrace.mercurialeclipse-feature'' plugin folder in eclipse-mercurial folder. --not anymore
: you may need to add that to the '''%prep''' in .spec file.
: you may need to add that to the '''%prep''' in .spec file.
:: In the old version, I added the feature as a source and used this '''%prep''' to unpack everything:
<pre>
<pre>
     %setup  
     %setup  
Line 46: Line 46:
: Go to window -> preferences -> changelog -> enter your name and email
: Go to window -> preferences -> changelog -> enter your name and email
: in .spec file editor -> %changelog -> Ctrl+Alt+C
: in .spec file editor -> %changelog -> Ctrl+Alt+C
 
* After making sure it works,  
* After making sure it works,: use this command to create the tar ball: <code> tar -cf eclipse-mercurial-1.8.1.tar.bz2 eclipse-mercurial-1.8.1</code>: some times it complained that it couldn't remove the folder eclipse-mercurial because it was not empty, one solution is to kill the process:
: I put the ''com.vectrace.mercurialeclipse-feature'' plugin folder in eclipse-mercurial folder.
: eclipse-mercurial also contains mercurial folder
: use this command to create the tar ball: <code> tar -cf eclipse-mercurial-R_1_0_0.tar.bz2 eclipse-mercurial</code>
: some times it complained that it couldn't remove the folder eclipse-mercurial because it was not empty, one solution is to kill the process:
<pre>
<pre>
     pgrep rpmbuild #if it showed the id so it's running
     pgrep rpmbuild   #if it showed the id so it's running
     kill `rpmbuild`
     kill `rpmbuild`
</pre>
</pre>
Line 62: Line 58:
: Install for the first time:
: Install for the first time:
:: cd PATH/TO/RPMS/IN/RPM-PROEJCT/noarch/
:: cd PATH/TO/RPMS/IN/RPM-PROEJCT/noarch/
:: rpm -i eclipse-mercurial-R_1_0_0.noarch.rpm
:: rpm -i eclipse-mercurial-1.8.1.noarch.rpm
: Install the updated packages
: Install the updated packages
:: Yum remove eclipse-mercurial-R_1_0_0
:: Yum remove eclipse-mercurial-1.8.1
:: again rpm -i....
:: again rpm -i....
: This will created a folder called ''mercurial'' in ''/usr/share/eclipse/dropins'' which will contain the ''feature.xml''
: This will created a folder called ''mercurial'' in ''/usr/share/eclipse/dropins'' which will contain the ''feature.xml''

Revision as of 19:42, 9 June 2011

References

Case Study

Mercurial Eclipse

hg archive -r RELEASE_1.8.1 --type=tar ../mercurialeclipse_1-8-1.tar.bz2
problem with this ccommand:
type=tar caused problem while decompressing the tar ball with pde-script, so we can just archive as a regular folder
It's better to keep the name of the folder as just mercurial then we will put it in a folder called eclipse-mercurial
so the new command is: hg archive -r RELEASE_1.8.1 ../eclipse-mercurial-1.8.1/mercurial
  • Create a new feature in Eclipse using New -> feature

Mercurial Create Feature

  • Add this feature id to %build in .spec file in -f option
Don't need to add -d (dependencies) for now, until it complains
Added mylyn as the dependency later
  • Create an archive file of the feature then add it to the SOURCES in RPM project.
Before, I put the com.vectrace.mercurialeclipse-feature plugin folder in eclipse-mercurial folder. --not anymore
you may need to add that to the %prep in .spec file.
     %setup 
     %setup -T -D -a 1
  • For using changelog
Go to window -> preferences -> changelog -> enter your name and email
in .spec file editor -> %changelog -> Ctrl+Alt+C
  • After making sure it works,: use this command to create the tar ball: tar -cf eclipse-mercurial-1.8.1.tar.bz2 eclipse-mercurial-1.8.1: some times it complained that it couldn't remove the folder eclipse-mercurial because it was not empty, one solution is to kill the process:
    pgrep rpmbuild    #if it showed the id so it's running
    kill `rpmbuild`

Eclipse Mercurial Spec File

  • To install the package
Install for the first time:
cd PATH/TO/RPMS/IN/RPM-PROEJCT/noarch/
rpm -i eclipse-mercurial-1.8.1.noarch.rpm
Install the updated packages
Yum remove eclipse-mercurial-1.8.1
again rpm -i....
This will created a folder called mercurial in /usr/share/eclipse/dropins which will contain the feature.xml