Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small improvements.

  • Loading branch information...
commit e8adfe15c2dbff00c8dee9d2363e35837675b12d 1 parent 53d8334
@dagwieers authored
Showing with 32 additions and 14 deletions.
  1. +6 −2 dar-build
  2. +20 −9 dar-perl.py
  3. +6 −3 dar-prepare
View
8 dar-build
@@ -96,6 +96,10 @@ for arg in $PKGS; do
continue
fi
+ if [ "$TAG" ]; then
+ TAGS="$TAG"
+ fi
+
if [ "$NODIST" ]; then
DISTTAG="0"
DISTNAME="nodist"
@@ -163,11 +167,11 @@ for arg in $PKGS; do
# echo $rpmfile
if [ -z "$FORCE_OVERWRITE" -a -f "$PACKAGEDIR/$app/$rpmfile" ]; then
warning "Package \"$PACKAGEDIR/$app/$rpmfile\" already exists."
-
+
# if [ -z "$SOURCE_DISTS" ]; then
# SOURCE_DISTS="$DISTNICK"
# fi
-
+
continue 4
fi
done
View
29 dar-perl.py
@@ -519,7 +519,7 @@ def parse_makefile(data):
else:
print >>out, 'BuildRequires: perl'
-if not package_make and package_build:
+if package_build:
print >>out, 'BuildRequires: perl(Module::Build)'
if meta.has_key('build_requires'):
@@ -559,23 +559,34 @@ def parse_makefile(data):
print >>out, "%build"
if noarch:
- if not package_make and package_build:
- print >>out, '%{__perl} Makefile.PL INSTALLDIRS="vendor" destdir="%{buildroot}"'
+
+ if package_build:
+ print >>out, '#%{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"'
+ print >>out, '#%{__make} %{?_smp_mflags}'
+ print >>out, '%{__perl} Build.PL'
+ print >>out, './Build'
+# print >>out, '%{__perl} Makefile.PL INSTALLDIRS="vendor" destdir="%{buildroot}"'
else:
print >>out, '%{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"'
- print >>out, '%{__make} %{?_smp_mflags}'
+ print >>out, '%{__make} %{?_smp_mflags}'
else:
- if not package_make and package_build:
- print >>out, 'CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor" destdir="%{buildroot}"'
+ if package_build:
+ print >>out, '#CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"'
+ print >>out, '#%{__make} %{?_smp_mflags} OPTIMIZE="%{optflags}"'
+ print >>out, 'CFLAGS="%{optflags}" %{__perl} Build.PL'
+ print >>out, './Build'
+# print >>out, 'CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor" destdir="%{buildroot}"'
else:
print >>out, 'CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"'
- print >>out, '%{__make} %{?_smp_mflags} OPTIMIZE="%{optflags}"'
+ print >>out, '%{__make} %{?_smp_mflags} OPTIMIZE="%{optflags}"'
print >>out
print >>out, '%install'
print >>out, '%{__rm} -rf %{buildroot}'
-if not package_make and package_build:
- print >>out, '%{__make} install'
+if package_build:
+ print >>out, '#%{__make} pure_install'
+ print >>out, 'PERL_INSTALL_ROOT="%{buildroot}" ./Build install installdirs="vendor"'
+# print >>out, '%{__make} install'
else:
print >>out, '%{__make} pure_install'
print >>out
View
9 dar-prepare
@@ -15,15 +15,18 @@ for distname in $DEFAULT_DISTS; do
ln -f $CHROOTDIR/${DEFAULT_DISTS// */}/root/.bash_history $CHROOTDIR/$distname/root/.bash_history
fi
- umount $CHROOTDIR/$distname{/dev/pts,/proc,/tmp,$ROOT/build,$ROOT/} 2>/dev/null
+ umount $CHROOTDIR/$distname{/dev/pts,/proc,/sys,/tmp,$ROOT/build,$ROOT/} 2>/dev/null
# rm -rf $CHROOTDIR/$distname{$RPMTMPPATH}/*
- mkdir -p $CHROOTDIR/$distname$ROOT/
- mount -o bind $ROOT $CHROOTDIR/$distname$ROOT/
+ mkdir -p $CHROOTDIR/$distname/$ROOT/
+ mount -o bind $ROOT $CHROOTDIR/$distname/$ROOT/
mkdir -p $CHROOTDIR/$distname/proc/
mount -t proc proc $CHROOTDIR/$distname/proc/
+ mkdir -p $CHROOTDIR/$distname/sys/
+ mount -t sysfs sys $CHROOTDIR/$distname/sys/
+
mkdir -p $CHROOTDIR/$distname/dev/pts/
mount -t devpts devpts $CHROOTDIR/$distname/dev/pts/
Please sign in to comment.
Something went wrong with that request. Please try again.