View previous topic :: View next topic |
Author |
Message |
Lazarus18 n00b
Joined: 01 May 2002 Posts: 38
|
Posted: Fri May 03, 2002 7:57 am Post subject: Creating ebuilds? |
|
|
Perhaps I'm seeking to get in over my head here, but I've never actively contributed to a distro, and here is my chance. What is involved in porting source code into an ebuild? There is a program my wife uses from NASA (called the fits viewer) that Debian had in apt-get. I've made it from source on my Yellowdog laptop, and it was not a problem, leading me to believe that the make file was well constructed and all that. I'd like to see if I can make an ebuild and get it into Gentoo. How would I go about doing that?
I have some knowledge of perl, but since ebuilds are bash, that should be no problem. Am I biting off more than I can chew? _________________ -Rob, Tired med student
Powermac G4 450 MHz (Sawtooth), 756 MB RAM, OS X.1.4
Powerbook G3 400 MHz (Pismo), 192 MB RAM, OS X.1.4, Gentoo Linux
Homebrew Athlon-xp 1800+ MHz, 512 MB DDR-RAM, GeForce 3Ti 500, Gentoo Linux, WinXP |
|
Back to top |
|
|
tod Developer
Joined: 17 Apr 2002 Posts: 136 Location: Ozarks, USA
|
Posted: Fri May 03, 2002 2:45 pm Post subject: |
|
|
Hi!
Creating ebuilds are good clean fun for the whole family
Portage and ebuilds are designed to be analogous to the standard "./configure, make, make install" procedure that you would follow when building and installing the most apps manually. (It only gets tricky when the build environment for the app doesn't support the above)
Unfortunately, the documentation has not kept up with Gentoo's (and portage's) rapid development recently. None the less, the follwing should help out.
http://www.gentoo.org/doc/en/gentoo-howto.xml
/usr/portage/skel.ebuild
'man 5 ebuild'
Also, studying the already existing ebuilds (recently updated ones are the best) in the portage tree is helpful.
Note: I would suggest merging app-admin/gentoolkit as lintool is included and can be used to help test your ebuilds.
Of course if you create a new ebuild, submit it to bugs.gentoo.org for inclusion in the portage tree.
Contributions are always welcome.
hth
tod |
|
Back to top |
|
|
scottro Tux's lil' helper
Joined: 13 Apr 2002 Posts: 141 Location: New York City
|
Posted: Fri May 03, 2002 5:45 pm Post subject: |
|
|
There's also Mr. Robbins' chapter in his excellent bash-scripting tutorial that's all about ebuilds.
Part 3 of his tutorial might be of use. (To see parts one and two--I don't think they're linked--just change that bash3 to bash for part one and bash2 for part two)
HTH
Scott |
|
Back to top |
|
|
Lazarus18 n00b
Joined: 01 May 2002 Posts: 38
|
Posted: Sat May 04, 2002 6:22 am Post subject: |
|
|
OK, so maybe this is more than I can chew .
The thing is that it doesn't use a standard ./configure make make install routine. It has one Makefile that runs configure and whatnot in multiple little subdirectories.
Would an ebuild support such a process, or would I have to figure out how to break it down into individual configure/make/make installs without the toplevel Makefile? Below is that toplevel Makefile I speak of.
---------------
#
SHELL=/bin/sh
#
########################################################################
TCLVERS = tcl8.3.2
TKVERS = tk8.3.2
ITCLVERS = itcl3.2.0
EXPVERS = expect-5.28
TCLSHVERS = 8.3
FTOOLS = $(FV)
########################################################################
COMPLIST = fitsTcl $(ITCLVERS) pow \
$(TCLVERS)/unix $(TKVERS)/unix
CONFIG_OPTION = --enable-shared
#####################################
# #
# Top level rules for building fv #
# #
#####################################
all: tcl8 tk8 itcl fitstcl1 pow1
install: install-compiled fv1
#####################
# Package compiles
#####################
tcl8:
if [ -d $(TCLVERS)/unix ]; then \
cd $(TCLVERS)/unix; \
rm -f config.cache; \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} ; \
${MAKE}; \
fi
tk8:
if [ -d $(TKVERS)/unix ]; then \
cd $(TKVERS)/unix; \
rm -f config.cache; \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} ; \
${MAKE}; \
fi
expect:
if [ -d $(EXPVERS) ]; then \
cd $(EXPVERS); \
rm -f config.cache; \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
--with-tclinclude=`pwd`/../$(TCLVERS)/generic \
--with-tkinclude=`pwd`/../$(TKVERS)/generic \
--with-tclconfig=`pwd`/../$(TCLVERS)/unix \
--with-tkconfig=`pwd`/../$(TKVERS)/unix; \
${MAKE}; \
fi
pow1:
if [ -d pow ]; then \
cd pow; \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION}\
--with-tclinclude=`pwd`/../$(TCLVERS)/generic \
--with-tkinclude=`pwd`/../$(TKVERS)/generic; \
$(MAKE) TARGETNAME=libpow; \
fi
itcl:
if [ -d $(ITCLVERS) ]; then \
cd $(ITCLVERS); \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
--with-tcl=`pwd`/../$(TCLVERS)/unix/ \
--with-tk=`pwd`/../$(TKVERS)/unix/; \
$(MAKE); \
fi
fitstcl1:
if [ -d fitsTcl ]; then \
cd fitsTcl; \
./configure --prefix=$(FTOOLS) ${CONFIG_OPTION} \
--with-tclinclude=`pwd`/../$(TCLVERS)/generic; \
$(MAKE); \
fi
fv1:
-mkdir ${FTOOLS}/lib/fv
if [ -d fv ]; then \
cd fv;\
cp -p fv ${FTOOLS}/bin/fv;\
cp -pr doc ${FTOOLS}/lib/fv;\
cp -pr class ${FTOOLS}/lib/fv;\
cp -p fvInit.tcl ${FTOOLS}/lib/fv; \
fi
###################
# Installation Rules
###################
install-compiled: install-tcl8 install-tk8 install-itcl install-pow install-fitstcl
install-tcl8:
if [ -f $(TCLVERS)/unix/Makefile ]; then \
cd $(TCLVERS)/unix; \
${MAKE} install; \
fi
@-cd ${FTOOLS}/bin; ln -s tclsh$(TCLSHVERS) tclsh 2> /dev/null
install-tk8:
if [ -f $(TKVERS)/unix/Makefile ]; then \
cd $(TKVERS)/unix; \
${MAKE} install; \
fi
@-cd ${FTOOLS}/bin; ln -s wish$(TCLSHVERS) wish 2> /dev/null
install-expect:
if [ -f $(EXPVERS)/Makefile ]; then \
cd $(EXPVERS); \
${MAKE} install; \
fi
install-pow:
if [ -f pow/Makefile ]; then \
cd pow; \
$(MAKE) TARGETNAME=libpow install; \
fi
install-itcl:
if [ -f $(ITCLVERS)/Makefile ]; then \
cd $(ITCLVERS); $(MAKE) install; \
fi
install-fitstcl:
if [ -f fitsTcl/Makefile ]; then \
cd fitsTcl; $(MAKE) FTOOLS=$(FTOOLS) install; \
fi
##################
# Cleaning rules
##################
cleanup: clean
rm -rf local/man
distclean:
@-for dir in ${COMPLIST}; do \
if [ -f $$dir/Makefile ]; then \
(cd $$dir; ${MAKE} distclean); status=$$?; \
fi; \
done
rm -rf local/*
clean: clean-itcl clean-tcltk8 clean-fitstcl clean-pow
clean-tcltk8:
if [ -f $(TCLVERS)/unix/Makefile ]; then \
cd $(TCLVERS)/unix; $(MAKE) clean; rm -f config.cache; \
fi
if [ -f $(TKVERS)/unix/Makefile ]; then \
cd $(TKVERS)/unix; $(MAKE) clean; rm -f config.cache; \
fi
clean-pow:
if [ -f pow/Makefile ]; then \
cd pow; $(MAKE) clean; rm -f config.cache; \
fi
clean-itcl:
if [ -f $(ITCLVERS)/Makefile ]; then \
cd $(ITCLVERS); $(MAKE) clean; rm -f config.cache; \
fi
clean-fitstcl:
if [ -f fitsTcl/Makefile ]; then \
cd fitsTcl; $(MAKE) clean; rm -f config.cache; \
fi
dist-clean: clean
------------------- _________________ -Rob, Tired med student
Powermac G4 450 MHz (Sawtooth), 756 MB RAM, OS X.1.4
Powerbook G3 400 MHz (Pismo), 192 MB RAM, OS X.1.4, Gentoo Linux
Homebrew Athlon-xp 1800+ MHz, 512 MB DDR-RAM, GeForce 3Ti 500, Gentoo Linux, WinXP |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|