From bc031147caec19b79e80f904a746fa043eccaa66 Mon Sep 17 00:00:00 2001 From: helixarch Date: Fri, 27 Feb 2015 06:12:25 +0200 Subject: [PATCH] Update --- README.md | 4 ++++ debtap | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5ab0544..8d3f240 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ A script for converting .deb packages into Arch Linux packages, focused on accur # FAQ +**Q: What "debtap" stands for?** + +**A:** DEB To Arch (Linux) Package + **Q: Isn't better to download an official package or write a PKGBUILD in case I need to compile a package or convert a .deb package to an Arch Linux package?** **A:** Sure it is, and I truely encourage you to do so. Debtap was written to create packages that either cannot be compiled (closed source packages) or cannot be built from AUR for various reasons (error during compiling or unavailable files), as a quick 'n' dirty solution and an extra option for creating Arch Linux packages for Arch Linux users. diff --git a/debtap b/debtap index 456156c..8946a7c 100755 --- a/debtap +++ b/debtap @@ -158,7 +158,7 @@ if [ $(grep ^Version: control | gawk '{print $2}' | grep -q "svn\|git\|cvs\|CVS\ fi # Generating pkgver field -version=$(grep ^Version: control | gawk '{print $2}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\./\./' | sed s'/\.$//') +version=$(grep ^Version: control | gawk '{print $2}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//') for i in {git,bzr,darcs,hg}; do if [ $(echo $version | grep -q $i; echo $?) -eq 0 ]; then echo "pkgver = `echo $version | gawk -F "$i" '{print $2}' | gawk -F '-' '{print $1}'`"-1 >> .PKGINFO; @@ -285,7 +285,7 @@ for i in $(for j in `cat tempfile05`; do echo $j-tempfile04; done); do fi; done -cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' > tempfile07 +cat tempfile06 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' > tempfile07 cat tempfile07 | while read line; do if [ $(echo "$line" | wc -w) -eq 0 ]; then @@ -345,7 +345,7 @@ if [ -e untranslated-names-only ]; then fi; done - cat tempfile11 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' > tempfile12 + cat tempfile11 | sed s'/=/ = /g' | sed s'/>/ > /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' > tempfile12 cat tempfile12 | while read line; do if [ $(echo "$line" | wc -w) -eq 0 ]; then @@ -3063,7 +3063,7 @@ if [ -e missing-files ]; then rm -rf missing-files fi -# Special rules for (non optional) dependencies +# Special rules for non optional dependencies if [ -e dependencies-initial-check-list ]; then grep -q qt final-check-list && echo hicolor-icon-theme >> final-check-list grep -q gtk final-check-list && echo -e "hicolor-icon-theme\ndesktop-file-utils" >> final-check-list @@ -3075,13 +3075,13 @@ grep -q libgl1 tempfile02 && echo libgl >> final-check-list; grep -q libglu1 tempfile02 && echo glu >> final-check-list; grep -q default-jre tempfile02 && echo java-runtime >> final-check-list; grep -q python:any tempfile02 && echo python >> final-check-list; -grep libpango tempfile02 | grep -v libpangomm | sed s"/`grep libpango tempfile02 | grep -v libpangomm | gawk '{print $1}' | head -1`/pango/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' >> final-check-list; -grep libpangomm tempfile02 | sed s"/`grep libpangomm tempfile02 | gawk '{print $1}' | head -1`/pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib\|lib32-//g' >> final-check-list; +grep libpango tempfile02 | grep -v libpangomm | sed s"/`grep libpango tempfile02 | grep -v libpangomm | gawk '{prinrt $1}' | head -1`/pango/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' >> final-check-list; +grep libpangomm tempfile02 | sed s"/`grep libpangomm tempfile02 | gawk '{print $1}' | head -1`/pangomm/g" | sed s'/=/= /g' | sed s'/>/> /g' | sed s'/ =/>=/g' | sed s'/< =/<=/g' | sed s'/-multilib$\|^lib32-//g' >> final-check-list; grep -q fonts-freefont-ttf tempfile02 && echo ttf-freefont >> final-check-list; # Stripping unnecessary symbols and words from packages versions grep -v "^$" final-check-list | while read line; do - echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\./\./g' | sed s'/\.$//'`" >> tempfile13; + echo "`echo "$line" | gawk '{print $1}'` `echo "$line" | gawk '{print $2}'` `echo "$line" | gawk '{print $3}' | sed -e s'/[+~]/-/g' -e s'/[-._]alpha/alpha/' -e s'/[-._]beta/beta/' -e s'/[-._]pre/pre/' -e s'/[-._]rc/rc/' -e s'/[-._]dfsg/dfsg/' | gawk -F 'dev' '{print $1}' | sed -e s'/-\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+\.[0-9]\+//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]\+\.[0-9]\+\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/-[0-9]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]\+\.[0-9]\+[a-z]*[0-9]*//g' -e s'/[a-z]*\(ubuntu\|debian\|build\|dfsg\|nobinonly\|ppa\|nmu\|deb\)[0-9]*[a-z]*[0-9]*//g' -e s'/--/-/g' -e s'/\.\././g' | sed s'/\.$//'`" >> tempfile13; done # Special rules for version control systems @@ -3215,7 +3215,7 @@ if [ -e conffiles ]; then rm -rf tempfile fi -# Generating (non optional) dependencies fields +# Generating non optional dependencies fields if [ $(grep -q Depends: control; echo $?) -eq 0 ]; then grep Depends: control | sed -e s'/Pre-Depends: //' -e s'/Depends: //' -e s'/ (/(/g' -e s'/= /=/g' -e s'/>> />/g' -e s'/<< /