Grep / sed help please..

am trying to make a new pkgbuild but the install dirs are coded in the makefile and will not be overridden with DESTDIR or prefix
in the makefile i have already sed out the references to local, however the variables for bin-prefix, data_prefix and highscore_prefix are on lines 1,2 and three respectively.
the sed command for removing local was lifted from another pkgbuild
as i see it there are a few options one is to remove lines 1,2,3 and then move the directories to pkg to be tarred up or to insert pkg into 1,2,3
i know you can also bind the root of the package but am stumped as to the correct commands, any ideas guys?

Sorry  :oops:
here is the pkg build
pkgname=twind
pkgver=1.1.0
pkgrel=1
pkgdesc="An addictive block game"
url="http://twind.sourceforge.net"
depends=('sdl' 'sdl_image' 'sdl_mixer')
source=(http://dl.sourceforge.net/sourceforge/twind/twind-1.1.0.tar.gz)
md5sums=('672dfe032e1f5657996b64cd666aef50')
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i -e "s:local/::" Makefile
make || return 1
mkdir -p $startdir/pkg/usr
make prefix=$startdir/pkg install
but the install command in the makefile will not accept external variable
here is the makefile...
# ONLY CHANGE THESE THREE OPTIONS IF YOU KNOW WHAT YOU ARE DOING
BIN_PREFIX = /usr/bin/
# if you don't have privileges to install systemwide, comment out both
# lines below and the game will then play from the current directory
DATA_PREFIX = /usr/share/games/twind/
HIGH_SCORE_PREFIX = /var/lib/games/twind/
# uncomment out the EXTENSION if you don't have the png libs on your system
#EXTENSION = ".bmp"
AUDIOFLAG = AUDIO
CC = gcc
ifdef EXTENSION
CFLAGS = -Wall -g -DDATA_PREFIX="$(DATA_PREFIX)"
-DEXTENSION="$(EXTENSION)" -D$(AUDIOFLAG) -DLINUX
-DHIGH_SCORE_PREFIX="$(HIGH_SCORE_PREFIX)"
else
CFLAGS = -Wall -g -DDATA_PREFIX="$(DATA_PREFIX)" -D$(AUDIOFLAG) -DLINUX
-DHIGH_SCORE_PREFIX="$(HIGH_SCORE_PREFIX)"
endif
LIBS = -lm
SDL_CFLAGS = `sdl-config --cflags`
SDL_LIBS = `sdl-config --libs` -lSDL_image
MIXER_LIB = -lSDL_mixer
all: twind
install:
mkdir -p $(DATA_PREFIX)graphics
mkdir -p $(DATA_PREFIX)music
mkdir -p $(DATA_PREFIX)sound
mkdir -p $(HIGH_SCORE_PREFIX)
ifdef EXTENSION
cp -r graphics/*.bmp $(DATA_PREFIX)graphics
else
cp -r graphics/*.png $(DATA_PREFIX)graphics
endif
cp -r music/*.ogg $(DATA_PREFIX)music
cp -r sound/*.wav $(DATA_PREFIX)sound
cp twind $(BIN_PREFIX)
chown root:games $(BIN_PREFIX)twind
chmod g+s $(BIN_PREFIX)twind
touch $(HIGH_SCORE_PREFIX)twind.hscr
chown root:games $(HIGH_SCORE_PREFIX)twind.hscr
chmod 664 $(HIGH_SCORE_PREFIX)twind.hscr
uninstall:
rm -rf $(DATA_PREFIX)
rm -f $(BIN_PREFIX)twind
noaudio:
make twind MIXER_LIB= AUDIOFLAG=NOAUDIO
twind: twind.o
$(CC) twind.o $(LIBS) $(SDL_LIBS) $(MIXER_LIB) -o twind
twind.o: twind.c
$(CC) $(CFLAGS) $(SDL_CFLAGS) -c twind.c
clean:
rm -f twind *.o
as i said from what i can tell i can either remove the variable and get it to build selfcontained and move this to pkg to be compressed
insert /pkg into the makefile
or bind the root of the install into $startdir
is this any clearer
as i understand it any of these options will put the needed files into pkg for makepkg to compress.

Similar Messages

  • [SOLVED] sed help please...

    I'm trying to modify an XFWM theme, and need to run sed to replace colors with a phrase to make it "blend in" with the GTK theme. Unfortunately, it isn't working. Can anyone help?
    Here is what I am trying to run:
    sed -e 's/\#E6E6E6/\#E6E6E6 s active_color_2/g' *-active.xpm
    The result of that gives me something similar to running cat *-active.xpm.
    Last edited by smartboyathome (2009-03-25 21:49:53)

    the above should work but i'd script it:
    edit that, the above will work and will work better, faster and more efficiently...
    but i'd still script it
    #!/bin/bash
    find ./ -name '*-active.xpm' | while read file; do
    cp $file $file.orig
    cat $file | sed 's/\#E6E6E6/\#E6E6E6 s active_color_2/g' > temp
    mv temp $file
    done
    Last edited by brisbin33 (2009-03-25 21:39:20)

  • I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    There are no updates to either OS 10.5.8 or Safari 5.0.6.
    If you need a later version of Safari you must first upgrade your operating system to a later version of OS X.

  • At the end of my IMovie I want to write some text: as in" Happy Birthday Mandy we had a great time with you. etc..  How do I go about this? Which icon in IMovie lets me have a place to write text?? help please

    Please see my ? above: Im making an IMovie and need the last frame to just be text (can be on a color). I don't know how to go about doing this.  Ive already done all my photos and captions. Need to have it ready for TOMORROW: Friday May 23rd. Help please!
    Thanks

    You can choose a background for the text from Maps and Backgrounds.  Just drag a background to the end of the timeline, adjust to desired duration then drag title above it.
    Geoff.

  • I have just updated my PC with version11.14. I can no longer connect to my Bose 30 soundtouch via media player Can anyone help please

    I have a Bose soundtouch system .Until today I could play my iTunes music through it via air  player . .I have just uploaded the latest upgrade from iTunes and now I am unable to connect to the Bose system . Can anyone help please? I can connect via my iPad and by using the Bose app so it is not the Bose at fault

    @puebloryan, I realize this thread is a bit old, but I have encountered a similr problem and wondered if you had found a solution. I've been using home sharing from itines on my PCs for years, but two days ago, it suddenly stopped. I can share from my Macs, but not from the ONE PC library where I keep all my tunes. I tried all the usual trouble-shooting measures.
    After turning home sharing off on the PC's iTunes, turning it back on and turning some other settings off and on, my Macs and Apple TV could briefly "see" the PC library, but as soon as I try to connect -- the wheel spins for a bit and then the connection vanishes. It's as if they try and then give up.
    Since this sounds so similar to your problem, I was hoping you finally found a solution. I am also starting a new thread. Thanks!

  • My iMac 24 can no longer be paired with the keyboard; it doesn't recognise any keyboard at boot up, even the one it is paired with. Can anyone help, please?

    My iMac 24 can no longer be paired with the keyboard; it doesn't recognise any keyboard at boot up, even the one it is paired with. Can anyone help, please?
    Thank. Simon

    Brian - The batteries are fine and there has only every been one keyboard paired with it. We have tried my MacPro keyboard as well, and it will not even recognise that there is a discoverable keyboard nearby.
    Thanks, Simon

  • Photoshop Elements 6 on Mac help please !!!!!

    Hi there,
              I need help please !!!!!
    I have PSE 6 for my imac and bought myself a NIKON D60 so far so good. I have installed PSE 6 which comes with ADOBE Bridge CS3
    I have bought a book as well as I am new to photoshop and in fact DSLR cameras.
    I have got my photos into Bridge OK by the way they are JPEG format. According to the book I can open the JPEG in camera RAW by either selecting the JPEG and then pressing cmd+R or by selecting the JPEG and select open with and camera RAW should be available to selct.
    I cannot get of the options to work any ideas please
    Secondly I have taken some photos in RAW format and put then into Bridge again I cannot get the camera RAW interface to open with these neff images.
    If I try to open the image PSE 6 opens and gives me an error that the file format is not supported by PSE 6
    Am I missing something here as I have been trying for a week now !!!!!
    Sorry if this comes across a stupid question but it is new to me
    Chris      UK

    There's no "theory" about it. You should be able to open a raw file from bridge by double-clicking it, but it will open in ACR in PSE. You can't just use ACR within bridge in PSE, if that's what you're trying to do. To open a JPEG in ACR, go to file>Open in PSE and choose Camera raw as the format after you select the file but before you click Open.
    If you've correctly updated ACR, bridge should show you thumbnails of your raw files. If it doesn't try emptying the Bridge cache.

  • Photoshop CS2. Help please.

    Approx 8 years ago I purchased Photoshop CS2 online from Adobe. This past weekend I had to buy a new computer (Windows 8.1), and when I logged into my Adobe account just now to obtain my serial number and enter it after I attempted to download CS2, it said invalid serial number. Help please.
    Both tech support and the online chat person were not able to help me.

    The Activation Servers for CS2 and prior have been taken down. See the link below for an explanation and solution. Be sure to follow all directions, including using the new download serial number supplied on the page.
    CS2 and prior
    http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    --OB

  • I  used to have an OLD Photoshop cd but it has been lost and my program is no longer on cd. I talked with some photographer friends and this is what one of them told me to get: Adobe Photoshop Lightroom and CS CC... HELP please?

    I  used to have an OLD Photoshop cd but it has been lost and my program is no longer on cd. I talked with some photographer friends and this is what one of them told me to get: Adobe Photoshop Lightroom and CS CC... HELP please?

    If you still have your serial number, look at OLDER previous versions http://www.adobe.com/downloads/other-downloads.html
    Otherwise, the US$ 9.99 plan is what is current at Cloud Plans https://creative.adobe.com/plans

  • Creative live cam voice help please

    Help please,
    We are using the "live cam voice" model, with our computer (Vista 32bit), that appears to work OK, but after a few minutes we get the BSOD! We have tried un installing and re-installing drivers without any effect.Has anyone had this problem and if so how did you fix it.
    Regards,
    Arthur

    Thanks for your response. I have tried 3 ports so far, all with the same outcome. One of my sons had it happen to him on another computer (XP SP2) using this webcam . As to programmes open at the same time, I am not computer literate and have no idea what programmes were running on each occasion.We use the webcam for Skype and apart from that I may also have IE open and perhaps Outlook Express. Over and above those CS4 sometimes.
    If I cannot resolve this, can any one suggest another webcam please.
    Regards,
    Arthur

  • I get error message "unknown error" When trying to log on to itunes via pc, help please!

    I get error message "unknown error" When trying to log on to itunes via pc, help please!

    Hello, trolle56.
    Thank you for the question.  You may find these articles helpful in troubleshooting the error received with the iTunes Store. 
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/ts3297
    Cheers,
    Jason H. 

  • I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it

    I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it doesnt work

    Hi Timia,
    If you are using Safari as a web browser :-
    Open Safari, go to Safari menu > Preferences > General, and put Google as the homepage. Then, choose Google as your default search engine.
    If you are using Google Chrome as the web browser :-
      Open Google Chrome.
      In the top right corner of the page, click the Chrome menu Chrome menu > Settings.
      In the "Search" section, select Google from the drop-down menu.
    Let me know if you still experience any issue.
    Regards,
    Aadesh

  • Will My Purchased Songs On My iPod Be affected if i sync my itunes library to my iPod?Help Please!

    A Song that i purchased on my iPod Wasnt able to get into my itunes library somehow ,and i want to sync my itunes library to my iPod because i recently Got a store brought CD and i want to insert it ,but im afraid my songs will get deleted ,especially my purchased ones...can someone help please ?

    Just sync. You can alway redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • My ipad just won't let me enter my apple password on FaceTime or iMessage, it works fine on my iPhone, I have tried numerous things but nothing works, can anybody help please, will a bug fix sort this out when they finally make one

    My ipad just won't let me sign in with my apple password on FaceTime or iMessage since updating to ios7 it says check my network connection, even though my iPhone works fine with the same password, can anybody help please, I have tried numerous things but nothing  works.  Will I have to wait for a bug fix to sort this? I hear they are working on one a the minute, I hate ios7

    Try a Restart.
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
    Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple.
    Here is a link to their contacts with most of the information below.
    http://www.apple.com/contact/

  • I have had to change my email address/Apple ID. my iPad recognisIes the change of id but on my MacBook Air, iCloud just keeps asking me for a password for the old email address/account. How can I get iCloud to recognise the new details? Help please!

    I have had to change my email address/Apple ID. My iPad recognises the new detail in iTunes and iCloud but when I go into iCloud through my MacBook Air, it requests a password for the old email account which I can no longer use. There is no Option to be able to change this email/ID detail as I cannot get further than the password request. Can anyone help please - this is driving me insane?!

    Go to System Preferences and click Sign Out, select Delete at all the prompts, then sign back in with the changed ID?   (Your iCloud data will disappear from your Mac when you sign out and choose Delete, but will still be in iCloud.  Provided you are signing back into the same account your data will reappear on your Mac when you sign back in.)

Maybe you are looking for

  • I can't find RobForm Lite in Add-ons to install. No RoboForm results in Search.

    I'm adding extensions to a new install of Firefox. When I search Add-ons for roboform 28 hits come up and none of them is RoboForm. Before, even if the add-on did not work with a specific version of Firefox, it would still come up in the search. What

  • Regarding multi sources to single target

    Hi all, In which case( business need) we will go for multi messages to a single one(n:1) mapping. so far I have encountered 1:n but not vice versa. Please explain business need and give some blogs to practice. Thanks

  • [Z77A-GD55] BETA UEFI Version [E7751IMS.1xx Releases]

    E7751IMS.161 ==> E7751IMS.162    01. Update the CRB 022a Codebase.    02. Fix TPM item enabled issue when load default after.    03. Update the WIN8 Logo.    04. Fix sometimes system will hang up in the shutdown process after idle it for some time.  

  • Closing the window after the video is complete.

    I'm obviously new to this, so please excuse the simple questions.... I need for the SWF files to actually close the window when they are complete, however, I get the following message when the video is finished. The webpage you are viewing is trying

  • Restablecer preguntas de seguridad

    No recuerdas las respuestas a las preguntas de seguridad de mi ID de Apple? Cómo puedo restablecer las preguntas, para poder comprar en Apple store me las piden y las olvidé y necesito comprar unas aplicaciones