summaryrefslogtreecommitdiffstats
path: root/t/data/SPECS/ordering-scriptlets/a_1.spec
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-31 10:41:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-31 10:41:10 +0000
commit2bc5884ec3473c039254286d5d33fca59f473491 (patch)
tree0d0d99c76eff910770670173c29aa6f1cb48cfae /t/data/SPECS/ordering-scriptlets/a_1.spec
parentddd855e54e8298ef21d346a9636dd88937dcde85 (diff)
downloadurpmi-2bc5884ec3473c039254286d5d33fca59f473491.tar
urpmi-2bc5884ec3473c039254286d5d33fca59f473491.tar.gz
urpmi-2bc5884ec3473c039254286d5d33fca59f473491.tar.bz2
urpmi-2bc5884ec3473c039254286d5d33fca59f473491.tar.xz
urpmi-2bc5884ec3473c039254286d5d33fca59f473491.zip
do not use builrequires dash-static, use gcc to build a special binary, so
that we are less mandriva centered
Diffstat (limited to 't/data/SPECS/ordering-scriptlets/a_1.spec')
-rw-r--r--t/data/SPECS/ordering-scriptlets/a_1.spec40
1 files changed, 40 insertions, 0 deletions
diff --git a/t/data/SPECS/ordering-scriptlets/a_1.spec b/t/data/SPECS/ordering-scriptlets/a_1.spec
new file mode 100644
index 00000000..f1ec3ea7
--- /dev/null
+++ b/t/data/SPECS/ordering-scriptlets/a_1.spec
@@ -0,0 +1,40 @@
+Summary: x
+Name: a
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: /bin/a
+BuildRequires: gcc
+BuildRoot: %{_tmppath}/%{name}
+
+%prep
+%setup -c -T
+cat <<EOF > a.c
+#include <stdio.h>
+int main(int argc, char **argv) {
+ FILE *f = fopen(argv[1], "r");
+ int c;
+ while ((c = getc(f)) > 0) putchar(c);
+ putchar('\n');
+ return 0;
+}
+EOF
+
+%build
+gcc -Wall -static -o a a.c
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -D a $RPM_BUILD_ROOT/bin/a
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%description
+x
+
+%files
+%defattr(-,root,root)
+/bin/*